Add new comment

I want to extract the raw

I want to extract the raw image pixel data from the file loaded - I'm asking if that code I posted with a bug will extract the 16 bit raw image data without the frame that is width*height. Right now I'm not seeing what I expect when I look at RawData.raw_image as what DCRAW -t 0 -d -4 wrote to the PGM file including the header looks like (I've shown the binary data as hex):

5202 3465
04 fA 02 80 04 40

Correction to the bug

for (int row = 0; row < S.height; row++)
// Write raw pixel data into our private bitmap format
pFiller->Write(RAW(row+S.top_margin, S.left_margin), sizeof(ushort), S.width);

and I cannot find that data in the raw_image array at or near raw_image(row+S.top_margin, S.left_margin)

David Partridge