Add new comment

1) The max possible 16-bit

1) The max possible 16-bit value is 65535
2) Many cameras, including Canons, contains 'masked pixels' around visible area. So, for first 100 values you query these service pixels.
Try this code:

#define R RawProcessor
int first_visible_pixel = R.imgdata.sizes.raw_width*R.imgdata_sizes.top_margin + R.imgdata.sizes.left_margin;
for(i=0; i< 100; i++)
  printf("%d ", R.imgdata.rawdata.raw_image(i+first_visible_pixel);

3) After raw2image the image[][] array contains values (only visible area!) for one component out of 4, three other pixel components are zero.

-- Alex Tutubalin @LibRaw LLC