• Welcome to Vampyre Imaging Library Forum. Please login or sign up.
 

Where to start to support libRaw library?

Started by Phil, 15 November 2012, 20:18:43

Previous topic - Next topic

Phil

Hi

Just started to use your excellent library and was wondering how I could add support for camera RAW images.  I looked at the FreeImage project ( http://freeimage.sourceforge.net/index.html ) and how they incorporated the libRAW library ( http://www.libraw.org/ ), but at the moment I'm a bit at loss where to start to do the same for the Vampyre Imaging Library.  Do you have any hints or would you consider supporting libRAW in a future version?

Thanks
Phil

Galfar

Hi,

integrating libRaw to FreeImage is easy since they are both C++ libraries.

For integration of C/C++ lib with Imaging in Pascal there are 3 options:
1) compile to shared library (DLL/SO) and link dynamically
2) compile to object files and link to Pascal program (like OpenJpeg and LibTiff in Imaging)
3) translate whole lib from C++ to Pascal (like zlib and jpeglib in Imaging)

Basically they rank in the same order in difficulty of integration.
I think 1) is easiest to start with as I see that libRaw comes with C API as well.
You would need to compile libRaw to DLL and write some short import unit in Pascal (with declaration of functions
and some types you want to use from the DLL).
Do you want to just load/save the images from RAW formats or some more functions from the lib?

Phil

15 November 2012, 22:27:16 #2 Last Edit: 15 November 2012, 22:54:55 by Phil
Thanks a lot for your quick response - much appreciated.

What I have in mind is to be able to read all formats that are supported by libRAW (or DCRAW respectively), develop the images by providing access to all functions of the library that are described at http://www.libraw.org/docs/Samples-LibRaw-eng.html and http://www.cybercom.net/~dcoffin/dcraw/dcraw.1.html , and assign the final image to a TSingleImage for further processing. For display I might use Graphics32, but I haven't decided yet. Saving to TIF, PSD, JPG and (maybe) DNG would be sufficient, I think.

Cheers
Phil


EDIT:
Just saw that the FreeImage people provide a Delphi wrapper in their source distribution. Maybe we can salvage that?

Galfar

Unfortunately, the Delphi wrapper in FreeImage is for FreeImage functions only - so FreeImage could be used in Delphi to load and save
RAWs but no functions of LibRAW for developing the images are exposed via FreeImage.

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Name:
Email:

Shortcuts: ALT+S save/post or ALT+P preview

SMF spam blocked by CleanTalk