Thank you for the reply. I followed the instructions (below) provided by rawpy (which uses LibRaw), as suggested by Iliah Borg (see further up for this discussion). Should I instead follow the LibRaw provided instructions?
Hi - I just wanted to confirm I installed from source correctly. Below is the terminal output resulting from my cmake command. As you'll note, it indicates a few files were not found. Additionally, can I remove the ~/Desktop/libraw folder I created to clone the libraw repo?
cmake .
-- CMake version: 3.18.4
-- LibRaw string version: 0.20.0
-- LibRaw ID version: 0x0200
-- LibRaw SO version: 20.0.0
-- The CXX compiler identification is GNU 10.2.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for LCMS2 availability...
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
-- Checking for module 'lcms2'
-- No package 'lcms2' found
-- lcms2 NOT found
-- Check for LCMS availability instead LCMS2...
-- Checking for module 'lcms'
-- No package 'lcms' found
-- Could NOT find LCMS (missing: LCMS_LIBRARIES LCMS_INCLUDE_DIR)
-- Found ZLIB: /usr/lib/arm-linux-gnueabihf/libz.so (found version "1.2.11")
-- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
-- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
-- Could NOT find Jasper (missing: JASPER_LIBRARIES JASPER_INCLUDE_DIR JPEG_LIBRARIES)
--
-- ----------------------------------------------------------------------------------
-- Libraw 0.20.0 configuration
--
-- Libraw will be compiled with OpenMP support .................. YES
-- Libraw will be compiled with LCMS support .................... NO
-- Libraw will be compiled with example command-line programs ... YES
-- Libraw will be compiled with RedCine codec support ........... NO
-- Libraw will be compiled with DNG deflate codec support ....... YES
-- Libraw will be compiled with DNG lossy codec support ......... NO
-- Libraw will be compiled with RawSpeed support ................ NO
-- Libraw will be compiled with debug message from dcraw ........ NO
-- Libraw will be compiled with Foveon X3F support .............. NO
-- Libraw will be compiled with Raspberry Pi RAW support ........ NO
-- Libraw will be compiled as a shared library
-- ----------------------------------------------------------------------------------
--
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/Desktop/libraw/libraw
RPi is indeed ARM-based, and we never performed extensive LibRaw testing on RPi. Based on my quick test, based on the fact that LibRaw is among Raspberry Pi libs packages (can be installed using apt), and based on experience of many RPi users, it does work.
Yep, no problem! One final question about all this for my own edification - my initial confusion about whether LibRaw could be installed on an RPi stemmed from here, which states "LibRaw has been tested on 32- and 64-bit Unix systems working on x86- (and AMD64-) compatible processors.". I am admittedly inexperienced with this, but I believe the RPi is ARM-based, so I wasn't sure if it was included on that list of tested systems. Please let me know if I've misunderstood. Thank you!
Why "seems", I checked with my RPi before posting.
Which method of installation to use depends on your needs.
Generally if you want a package (rawpy in your case), it's a good idea to follow the instructions accompanying the package, especially when those instructions refer to a particular (not the latest) version of a library. You will need to install git and cmake,
My apologies re. "seems" - I did not intend to cast doubt on your reply. Thank you very much for all the helpful information, and for checking these installation instructions on your own RPi - that is greatly appreciated! I am looking forward to using LibRaw.
Thank you for the helpful information! So it seems LibRaw can be installed on an RPi - this is great!
Just to clarify, in the case where both options are available (apt install or compiling), is there a reason why I would choose one over the other (e.g. will the compiling option give me a newer version)?
Additionally, re. compiling, I found these instructions on rawpy's website (a package I'm hoping to use), which look similar to the instructions you provided above, but there are some differences - will either set of instructions work?
Yes, you need to link with libraw_r on Mac/Linux (and, yes, Windows build is thread-safe)
Also, thread stack may be too small for on stack allocation (LibRaw rawProcessor), so dynamic allocation is preferred (LibRaw *rawProcessor = new LibRaw;)
Thank you for your help.
Than I there is another issue related to the Java wrapper - Sorry for that. The output_color=0 was already commented out therefore was never active (leading slashes).
I have now removed the options and use the lib with the default options. After JDK18 I have to generate the sources from the header file again and will see if that helps.
Nevertheless under windows I had troubles with ljpeg-8d which is not compiling. For now I have removed libjpeg from all builds because it is not so important for the users.
samples/raw-identify.cpp sample: removed lot of extra output used only by development team
I'm not sure this was a good change. It was great to be able to get more info about the files. Please add it back.
I have now found the issue which parameter is causing the problem. If one of those parameters below are set the colors are washed out. In 0.20.2 this is not happening.
I try's the sample applications and you are right that all is working.
The problem is that the sample applications are not setting any params. As soon as you add my param list the output colors are also washed out.
I am using the following params to speed up decoding of x-trans files (For Canon/Nikon it doesn't matter). Without those parameters the encoding is much slower. But if I set only one parameter the color are washed out independently which parameter I set:
use_camera_wb$set(params$slice, 0);
use_auto_wb$set(params$slice, 0);
output_tiff$set(params$slice, 0);
half_size$set(params$slice, 0);
user_qual$set(params$slice, 0);
Please try to reproduce the problem using LibRaw's sample application (dcraw_emu or simple_dcraw). If these applications produces correct results, the problem source is probably in your code or in Java wrapper you use.
Brightness adjustement and maximum level adjustement are different things (wrong maximum may/will result into 'pink highlights' problem and auto-adjust works against it).
I agree, set_maximum_adj_threshold should be added to C-API.
with dcraw_emu using -M -o 0 -c 0 -j -W -q 1 -4 -T as arguments, both TIFF images converted from CR3 now look equally bright, and the two TIFF images converted from the corresponding DNG files also look equally bright. However, the TIFF images converted from CR3 and DNG differ in brightness. Is this by design?
I'm now trying to figure out how to use it programmatically. The parameter adjust_maximum_thr seems not to be accessible from the libraw_set_... API. I'm using C# with InteropServices. I think I can write such method and amend it to libraw; or better maybe you should consider the addition of this method (something like libraw_set_maximum_threshold).
Thank you for the reply. I followed the instructions (below) provided by rawpy (which uses LibRaw), as suggested by Iliah Borg (see further up for this discussion). Should I instead follow the LibRaw provided instructions?
We dropped Cmake support in LibRaw in 2014, so we do not know what cmake scripts you use and what they do and whether it is correct or not.
Supported build methods are ./configure && make and also just make -f Makefile.dist
Hi - I just wanted to confirm I installed from source correctly. Below is the terminal output resulting from my cmake command. As you'll note, it indicates a few files were not found. Additionally, can I remove the ~/Desktop/libraw folder I created to clone the libraw repo?
cmake .
-- CMake version: 3.18.4
-- LibRaw string version: 0.20.0
-- LibRaw ID version: 0x0200
-- LibRaw SO version: 20.0.0
-- The CXX compiler identification is GNU 10.2.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for LCMS2 availability...
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
-- Checking for module 'lcms2'
-- No package 'lcms2' found
-- lcms2 NOT found
-- Check for LCMS availability instead LCMS2...
-- Checking for module 'lcms'
-- No package 'lcms' found
-- Could NOT find LCMS (missing: LCMS_LIBRARIES LCMS_INCLUDE_DIR)
-- Found ZLIB: /usr/lib/arm-linux-gnueabihf/libz.so (found version "1.2.11")
-- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
-- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
-- Could NOT find Jasper (missing: JASPER_LIBRARIES JASPER_INCLUDE_DIR JPEG_LIBRARIES)
--
-- ----------------------------------------------------------------------------------
-- Libraw 0.20.0 configuration
--
-- Libraw will be compiled with OpenMP support .................. YES
-- Libraw will be compiled with LCMS support .................... NO
-- Libraw will be compiled with example command-line programs ... YES
-- Libraw will be compiled with RedCine codec support ........... NO
-- Libraw will be compiled with DNG deflate codec support ....... YES
-- Libraw will be compiled with DNG lossy codec support ......... NO
-- Libraw will be compiled with RawSpeed support ................ NO
-- Libraw will be compiled with debug message from dcraw ........ NO
-- Libraw will be compiled with Foveon X3F support .............. NO
-- Libraw will be compiled with Raspberry Pi RAW support ........ NO
-- Libraw will be compiled as a shared library
-- ----------------------------------------------------------------------------------
--
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/Desktop/libraw/libraw
RPi is indeed ARM-based, and we never performed extensive LibRaw testing on RPi. Based on my quick test, based on the fact that LibRaw is among Raspberry Pi libs packages (can be installed using apt), and based on experience of many RPi users, it does work.
LibRaw works fine on Apple M1 ARM chip
Yep, no problem! One final question about all this for my own edification - my initial confusion about whether LibRaw could be installed on an RPi stemmed from here, which states "LibRaw has been tested on 32- and 64-bit Unix systems working on x86- (and AMD64-) compatible processors.". I am admittedly inexperienced with this, but I believe the RPi is ARM-based, so I wasn't sure if it was included on that list of tested systems. Please let me know if I've misunderstood. Thank you!
> it seems LibRaw can be installed on an RPi
Why "seems", I checked with my RPi before posting.
Which method of installation to use depends on your needs.
Generally if you want a package (rawpy in your case), it's a good idea to follow the instructions accompanying the package, especially when those instructions refer to a particular (not the latest) version of a library. You will need to install git and cmake,
After LibRaw is installed the way rawpi instructions suggest, check
If it's empty, and you want to use LibRaw independently / check the installation:
Re "seems" - I was half-joking, I got your meaning, but wanted to make it clear to readers that I checked the things.
Good luck!
My apologies re. "seems" - I did not intend to cast doubt on your reply. Thank you very much for all the helpful information, and for checking these installation instructions on your own RPi - that is greatly appreciated! I am looking forward to using LibRaw.
The easy way to install is:
To compile, install git, and after that:
To check,
Thank you for the helpful information! So it seems LibRaw can be installed on an RPi - this is great!
Just to clarify, in the case where both options are available (apt install or compiling), is there a reason why I would choose one over the other (e.g. will the compiling option give me a newer version)?
Additionally, re. compiling, I found these instructions on rawpy's website (a package I'm hoping to use), which look similar to the instructions you provided above, but there are some differences - will either set of instructions work?
Yes, you need to link with libraw_r on Mac/Linux (and, yes, Windows build is thread-safe)
Also, thread stack may be too small for on stack allocation (LibRaw rawProcessor), so dynamic allocation is preferred (LibRaw *rawProcessor = new LibRaw;)
Thank you for your help.
Than I there is another issue related to the Java wrapper - Sorry for that. The output_color=0 was already commented out therefore was never active (leading slashes).
I have now removed the options and use the lib with the default options. After JDK18 I have to generate the sources from the header file again and will see if that helps.
Nevertheless under windows I had troubles with ljpeg-8d which is not compiling. For now I have removed libjpeg from all builds because it is not so important for the users.
samples/raw-identify.cpp sample: removed lot of extra output used only by development team
I'm not sure this was a good change. It was great to be able to get more info about the files. Please add it back.
I do not see color change due to user_qual=0 (output_tiff=0, half_size=0 are the default value).
BTW, you set output_color=0 too. This turns off camera color to sRGB (or other known colorspace) conversion and will result in washed colors.
I have now found the issue which parameter is causing the problem. If one of those parameters below are set the colors are washed out. In 0.20.2 this is not happening.
libraw_output_params_t.output_tiff$set(params$slice, 0);
libraw_output_params_t.half_size$set(params$slice, 0);
libraw_output_params_t.user_qual$set(params$slice, 0);
I try's the sample applications and you are right that all is working.
The problem is that the sample applications are not setting any params. As soon as you add my param list the output colors are also washed out.
I am using the following params to speed up decoding of x-trans files (For Canon/Nikon it doesn't matter). Without those parameters the encoding is much slower. But if I set only one parameter the color are washed out independently which parameter I set:
use_camera_wb$set(params$slice, 0);
use_auto_wb$set(params$slice, 0);
output_tiff$set(params$slice, 0);
half_size$set(params$slice, 0);
user_qual$set(params$slice, 0);
Tested with dcraw_emu -T -w, for both 0.20-stable branch (from github) and for master branch (also from github).
I do not see great color difference here: https://www.dropbox.com/s/vdlbhfyd6e53pu0/Screenshot%202022-01-11%2021.4...
Files produced are also (temp.) stored on dropbox for your inspection: https://www.dropbox.com/sh/ek4rezjhju4xmmx/AACVcj-2X4G1EvI6cpkbpA3xa?dl=0
Please try to reproduce the problem using LibRaw's sample application (dcraw_emu or simple_dcraw). If these applications produces correct results, the problem source is probably in your code or in Java wrapper you use.
EOS R5 (released in 2020) and R3 (released in 2021) are different cameras.
R3 will be supported in the next public version (snapshot or beta/release, whatever come first)
Hi, i have same problem from cannon R3 cr3 (decoded with a purple tint) , that confuse me if R5 is supported
This patch: https://github.com/LibRaw/LibRaw/commit/b31fa58eea272c4ba67ccdbd527f329a...
Exposes adjust_maximum_thr to the C-API
Brightness adjustement and maximum level adjustement are different things (wrong maximum may/will result into 'pink highlights' problem and auto-adjust works against it).
I agree, set_maximum_adj_threshold should be added to C-API.
Hi Alex,
with dcraw_emu using -M -o 0 -c 0 -j -W -q 1 -4 -T as arguments, both TIFF images converted from CR3 now look equally bright, and the two TIFF images converted from the corresponding DNG files also look equally bright. However, the TIFF images converted from CR3 and DNG differ in brightness. Is this by design?
I'm now trying to figure out how to use it programmatically. The parameter adjust_maximum_thr seems not to be accessible from the libraw_set_... API. I'm using C# with InteropServices. I think I can write such method and amend it to libraw; or better maybe you should consider the addition of this method (something like libraw_set_maximum_threshold).
I already used in my program:
```
libraw_set_no_auto_bright(handler, 1);
libraw_set_bright(handler, 1.0f);
```
so I expected no automatic brightness adjustment anyway.
Thanks, LelliD
(copied from E-mail, probably this answer may be interested to public)
To turn off automated maximum adjustement use dcraw_emu -c 0 (imgdata.params.adjust_maximum_thr = 0)
We never publish files that are sent to us without explicit permission.
Please use any file sharing service (e.g. WeTransfer/free option) and send the link to info@libraw.org
Pages