Add new comment

image[][4] is used for both

image[][4] is used for both intermediate results and for final result.
After dcraw_proces() is called,
image[i][0..2] contains final image in 16-bit and in linear space for i-th pixel
image[i][3] contains some garbage (not used intermediate results, etc).

Also, image[] is not rotated (if rotation is set via metadata or via user_flip)

make_mem_image prepares final result: 3 components per pixel, gamma corrected (according to imgdata.params.gamm[]), 8 or 16 bit (according to params.output_bps)

-- Alex Tutubalin @LibRaw LLC