Add new comment

A question about "dcraw_make_mem_image"

Hi Alex,

For the image data generated from "dcraw_make_mem_image()", I see it is of "uchar" type according to the documentation:

"
unsigned char data[] Data array itself.
Should be interpreted as RGB triplets for bitmap type and as JPEG file for JPEG type.
"

For 16-bit image, when I need to convert "uchar" data array to "float" data array, the "original" values won't stay so the image won't convert correctly.

I am just wondering are there any functions that return "floating-point" data array after "dcraw_process()" is called.

I am aware that in dcraw, it has something like "ushort curve[ ]" and a function of "write_ppm_tiff()" to handle the difference between 8-bit and 16-bit output, specifically the section of code from line#19365 to line#19374 in "LibRaw/dcraw.c"

Thanks,

Mio

Forums: