12b0e5d60 Snapshot 202403 a4c9b1981 loop parameters in remove_trailing_spaces e231b01a4 CR3-Qstep table: avoid wrong 64-bit code generation 21368133a 0.21.2 release a6f212a4a tag type => tag size mapping fixed 41506ef73 cubic_spline: better handling of non-integer data 17294b5fd extra metadata check in arq_load_raw 47d9dd8e2 Better incorrect data handling in cubic_spline 3baa51068 skip invalid pattern in xtrans_interpolate eaf63bf5f Check HL recovery coeffs before processing a14574080 limit wavelet denoise minimum size 4e597e4e9 Merge pull request #594 from pinotree/path_max 086dcb9a6 raw-identify: use fallback if PATH_MAX not available 0e105f9f8 additional check against corrupted ljpeg layout 0c8b68e9f Disable color conversion for Canon 16-bit thumbnails cd1abd695 docs/changelog: explained the case when no thumbnail is found in specific file 6fffd414b rename swapXX to libraw_swapXX to avoid name conflict af78ae48a Check against corrupted LJPEG header in Canon sRAW decoder ba780e600 Limit embedded color profile allocation/read size 122bf7c5b Wrong alloc result check for 16-bit bitmap thumbnail e6dd2709e check pana_data/buffer offset before use ae2dc5884 Check P1 quadrant linearization coeff[15] against zero f2998bacc avoid integer overflow in buffer space check 443b7fb51 prevent buffer overrun in buffer_datastream::scanf_one 35a6d3615 ensure correct T.tlength for 16b bitmap thumbnails(2) b69ea8be5 ensure correct T.tlength for 16b bitmap thumbnails 2b6eca897 Do not run sraw decoder on (crafted) bayer files 68808b57f better striped thumbnails handling 9ab70f6dc do not set shrink flag for 3/4 component images 32425dd96 allow more decoders for fuji-rotated RAWs REVERT: 1ef70158d 0.21.2 release REVERT: 62f042366 tag type => tag size mapping fixed REVERT: ee087e3fe cubic_spline: better handling of non-integer data REVERT: af755b991 extra metadata check in arq_load_raw REVERT: 0fadd8819 Better incorrect data handling in cubic_spline REVERT: d7fb66053 skip invalid pattern in xtrans_interpolate REVERT: d059ed280 Check HL recovery coeffs before processing REVERT: 104730519 limit wavelet denoise minimum size REVERT: cae09838e raw-identify: use fallback if PATH_MAX not available REVERT: d6c677608 additional check against corrupted ljpeg layout REVERT: 1001a6ac1 Disable color conversion for Canon 16-bit thumbnails REVERT: a5130b01b docs/changelog: explained the case when no thumbnail is found in specific file REVERT: 600c0c63d rename swapXX to libraw_swapXX to avoid name conflict REVERT: 299c8a11b Check against corrupted LJPEG header in Canon sRAW decoder REVERT: ec8671ad9 Limit embedded color profile allocation/read size REVERT: 5229d5942 Wrong alloc result check for 16-bit bitmap thumbnail REVERT: b278b775f check pana_data/buffer offset before use REVERT: 7f4b8d3af Check P1 quadrant linearization coeff[15] against zero REVERT: e942a7db6 avoid integer overflow in buffer space check REVERT: f6a57cfb8 prevent buffer overrun in buffer_datastream::scanf_one REVERT: 3e62ed304 ensure correct T.tlength for 16b bitmap thumbnails(2) REVERT: 8e52d81cd ensure correct T.tlength for 16b bitmap thumbnails REVERT: 8e1af15e2 Do not run sraw decoder on (crafted) bayer files REVERT: 0ace959c2 better striped thumbnails handling REVERT: 477e0719f do not set shrink flag for 3/4 component images REVERT: c8efae6c5 allow more decoders for fuji-rotated RAWs git-subtree-dir: rtengine/libraw git-subtree-split: 12b0e5d60c57bb795382fda8494fc45f683550b8
5.8 KiB
LibRaw Compilation and Installation
LibRaw is distributed in the form of source codes. For further use, they should be compiled (and, if desired, placed into system folders with libraries and include-files).
Unix Systems (FreeBSD, Linux, Mac OS X)
To build the library, you will need a working C++ compiler (gcc 3+ and clang 2+ are OK) and the make utility.
Additional libraries (optional):
- zlib (used to decode deflated DNGs)
- libjpeg8 (used to decode lossy DNGs and several old Kodak cameras)
LibRaw has been tested on 32- and 64-bit Unix systems working on x86- (and AMD64-) compatible processors. Building and work on other architectures have not been tested.
Compilation of Library and Examples
Unpack the downloaded distribution package.
tar xzvf LibRaw-X.YY.tar.gz
For GitHub downloads (clones), perform ./configure script generation via
autoreconf --install
Go to LibRaw directory and run ./configure and make:
cd LibRaw-X.YY ./configure # with optional args make
As a result, you will compile
- Library libraw.a in the lib/ folder
- Examples in the bin/ folder (source codes of examples are in the samples/ folder).
In the current version, only static libraries are built:
- libraw.a: non-thread-safe version
- libraw_r.a: thread-safe
Build parameters
./configure script have some non-standard parameters:
- --enable-openmp
--disable-openmp - Enable/disable OpenMP support if compiler supports it. OpenMP is enabled by default.
- --enable-lcms
--disable-lcms - Enable/disable LCMS color engine support. If enabled, ./configure will try to find lcms library. Both LCMS-1.x and LCMS-2.x are supported LCMS support is enabled by default
- --enable-examples
--disable-examples - Enables/disables examples compilation and installation. Enabled by default
Installation and Usage
To install the library, run
sudo make install
It will place the libraries in /usr/local/lib, the include-files
in /usr/local/include (subfolder of libraw) and LibRaw samples to
/usr/local/bin. You can override installation path by using
./configure script.
To use LibRaw, add the following parameters to the compiler call (when
building your own projects):
- Path to include-files: -I/usr/local/include
- Path to libraries: -L/usr/local/lib
- Library: -lraw (ordinary version) or -lraw_r (thread-safe version).
Windows: Building under Cygwin
Building and installation are completely similar to building and installation under Unix systems.
Windows: Native Building
Building under Windows has three steps:
- Unpack the distribution package (if you have got no tar+gzip, take the LibRaw distribution package in the .ZIP format) and go to folder LibRaw-X.YYY.
- Set the environment parameters so that the compiler/linker would find the libraries and include-files. For Visual C++, this is done by running vcvars32.bat.
- Run
nmake -f Makefile.msvc
You may need to edit Makefile.msvc to provide libjpeg/zlib paths to INCLUDE/LIB.
If all paths are set correctly and the include-files/libraries have been found, then the following will be compiled:
- Library libraw_static.lib in folder lib
- Dynamic library bin/libraw.dll and linking library for it lib/libraw.lib
- Examples in folder bin/.
Only the thread-safe library is built under Win32, but it can be used with non-threaded applications as well. All examples are linked with the dynamic library (DLL); if static linking is necessary, one should link applications with library libraw_static.lib and set the preprocessor option /DLIBRAW_NODLL during compilation.
Windows-version compiles without LCMS support for now.
During building of DLL, all public functions are exported; further, the exported subset may be reduced.
Unfortunately, paths to include/ libraries depend on the way Visual C (or other compiler) is installed; therefore, it is impossible to specify some standard paths in Makefile.msvc.
Windows Installation
No installation under Windows is supported. It is assumed that all DLLs will be supplied together with the software using them (and this software will perform the installation). Accordingly, in building of programs using LibRaw, the paths to libraries, DLLs, and include-files should be specified manually.
[back to Index] </html>