LibRaw 18.0 with LCMS2 and Libjpeg-turbo.

Hi again,

I was reading this http://www.linuxfromscratch.org/blfs/view/svn/general/libraw.html article and I saw that these libraries are *optional* I am trying to build a version of LibRaw that has support (is linked to) LCMS and Libjpeg Turbo.

So I went ahead and built everything LCMS and libjpeg the way I want. Now I am doing the following

1. going to libraw->properties->Linker->input->*add jpeg8,turbojpeg.lib, lcms.lib* to dependencies
2. libraw->properties->Linker->general->*add specified path to* to dependencies
3. Build solution.

Then I try to run the generated libraw.dll with dependency walker (http://www.dependencywalker.com/), but I only see zlibwapi as an external dependency (it's the way I built it).

Then I decided to add the libraries as Delayload and I am getting the

```warning LNK4199: /DELAYLOAD:jpeg.dll ignored; no imports found from jpeg.dll```

I get the same if I add /DELAYLOAD to all the projects in LibRaw solution. So my question is - is this supported? if so, how do I add the libraries?

Respectfully,

--Karo.

Forums: 

To use JPEG library you need

To use JPEG library you need to add defines USE_JPEG and USE_JPEG8 when you build LibRaw

To use LCMS add USE_LCMS define.

-- Alex Tutubalin @LibRaw LLC

Thanks.

Thanks.

And as for JasPer I need to specify USE_JASPER? It's weird when I try to do that, because suddenly it wants unistd.h

Yes, USE_JASPER

Yes, USE_JASPER

But libjusper is needed only for (old) Red JPEG2000-encoded files, no other format uses it.

-- Alex Tutubalin @LibRaw LLC

JasPer not Working?

Sorry to bother you again, I managed to resolve the unistd.h issue, by defining JAS_WIN_MSVC_BUILD, and even though preprocessor understands USE_JASPER and looks for all dependencies I still get

jasper.dll ignored; no imports found from jasper.dll

What might be the issue, should I specify jasper in other project than libraw in the solution?

Please try to decode R3D

Please try to decode R3D image. If it works, it may means you've linked jasper statically

-- Alex Tutubalin @LibRaw LLC

Thanks.

Thanks.

That was the case, but now I am baffled. If building jasper on linux there are options like
--disable-static and
--enable-shared

On windows however I can only open the .dsw file which generates the solution, and the needed preprocessor definitions for dynamic build are nowhere in the documentation.

TurboJpeg

Is there an optional dependency on turbojpeg?

libjpeg-turbo is a 'plugin

libjpeg-turbo is a 'plugin replacement' for libjpeg.

Just build it in JPEG8-compatible mode and use with libraw. It works.

-- Alex Tutubalin @LibRaw LLC