Add new comment

libraw_dcraw_make_mem_image returns image with empty data size

When I call the method libraw_dcraw_make_mem_image the return result is a valid image pointer, but the image->data_size is 0, as well as width + height.
The error code is 317061776, and the image is obviously invalid. The previous call to libraw_dcraw_process returns a status code of 0.
When I run the same code with half_size=1 as input, everything works fine. So I guess it's likely an error in memory allocation. The device (Android 7.0 OS) I'm working with has around 1-2 GB RAM (depending what other processes might running), and the image is from a Sony A7RII (42 Megapixels).
Is there any way to avoid this, since it seems like the device memory should be large enough to decode this fine (dcraw standalone works fine).

Same code + file works on an other device (64 Bit Binary), other images (like from Sony RX100 III) also work fine on the same device.

Forums: