I am trying to read raw images with libraw and paint them to screen.
I need to extract per pixel RGB values where each color component must be in 0-255 range.
I am loading a raw file, iProcessor.imgdata.params.output_bps reports 8 bits per plane.
Whilst reading the image with iProcessor.imgdata.image[idx], I see values way above 255.
Am I missing something simple ?
Image is here: http://www.rawsamples.ch/raws/canon/40d/RAW_CANON_40D_SRAW_V103.CR2
Yes, output is converted to
Yes, output is converted to 8-bit only on file/memory writing stage (i.e. on output).
So, you may call dcraw_make_mem_image() to create 3-component 8-bit bitmap.
-- Alex Tutubalin @LibRaw LLC