dcraw_make_mem_thumb

You note that this will return either JPEG or RGB. Why not leave this in PPM format like dcraw_thumb_writer?

Additionally there's a typo in the documentation as it states that the type will be LIBRAW_IMAGE_JPEG, regardless. I checked the code and it appears to correctly type LIBRAW_IMAGE_BITMAP for RGB output.

Forums: 

dcraw_make_mem_thumb()

dcraw_make_mem_thumb() return thumbnail 'as is', no processing is done.
Most RAW formats stores thumbnail in JPEG format.

-- Alex Tutubalin

I'm trying to open phase one

I'm trying to open phase one images which have PPM thumbnails. When I extract the thumbnail with dcraw I get PPM. When I use libraw I seem to get just the RGB data, without the PPM header. Am I doing something wrong or is it getting stripped?

OK, I see, so that aspect of

OK, I see, so that aspect of dcraw output is not emulated and that's intentional?

dcraw produces *file*, not in

dcraw produces *file*, not in-memory object.
Dcraw file output is emulated in dcraw_emu sample

-- Alex Tutubalin