i using dcraw command line utility extract thumbnails dng images. thumbnail colors way off , inverting them not help. i took photo camera , preview looks this: here how call dcraw: settings osettings = settings.getinstance(); var startinfo = new processstartinfo(dcrawpath) { arguments = "-e \"" + sinputfilename + "\"", useshellexecute = true, redirectstandardoutput = false, windowstyle = processwindowstyle.hidden, createnowindow = true, workingdirectory = rootdirectory }; var process = process.start(startinfo); the result ppm file looks this: i tried inverting thumbnail using code: static readonly colormatrix _inversecolormatrix = new colormatrix(new[] { new float[] {-1, 0, 0, 0, 0}, new float[] {0, -1, 0, 0, 0}, new float[] {0, 0, -1, 0, 0}, new float[] {0, 0, 0, 1, 0}, new float[] {1, 1, 1, 0, 1} }); public static bitmap inverseimage(bitmap source) { var newbitmap = new bitmap(source.width, ...