Add new comment

LIBRAW Thread Safety

Hi team,
I had a question about whether libraw can be used to read and process RAW files in a multithreaded application when using the single-threaded library version. I was not able to get a clear idea based on the API description page:

I plan to create a rawProcessor and read a file on a single thread. I plan to use multiple threads to read multiple files simultaneously.

My workflow is something like:
LibRaw rawProcessor;
libraw_processed_image_t *image = rawProcessor.dcraw_make_mem_image(&ret);

LibRaw rawProcessor;
copyData(rawData.raw_image, out)

on each thread.

Do I need to link against libraw_r version of the library on Linux and Mac? I believe the Windows version is already thread safe.