Recent comments

Reply to: Unsupported file format or not RAW file even with USE_DNGSDK   8 months 2 weeks ago

As mentioned in the README.DNGSDK.txt file in the LibRaw distribution:

In your application
* create dng_host object (or derived object, e.g. with multithreaded) entity in your program;
* pass it to LibRaw via LibRaw::set_dng_host(dng_host *) call to enable DNG SDK use on runtime

mem_image sample does not have this pieces of code, so please test with dcraw_emu -dngsdk

Reply to: Unsupported file format or not RAW file even with USE_DNGSDK   8 months 2 weeks ago

I got a proper photo from my phone that I added to the repository now and set it as the default file to be tested with the script.

0.505 Filename: ../../testfiles/unreadable.dng
0.505 Timestamp: Mon Aug 25 22:32:35 2025
0.505 Camera: Samsung SM-S908U ID: 0x0
0.505 Normalized Make/Model: =Samsung/SM-S908U= CamMaker ID: 59
0.505 UniqueCameraModel: =SM-S908U=
0.505  DNG Version: 1.7.0.0
0.505
0.505 EXIF:
0.505   MinFocal: 0.0 mm
0.505   MaxFocal: 0.0 mm
0.505   MaxAp @MinFocal: f/0.0
0.505   MaxAp @MaxFocal: f/0.0
0.505   CurFocal: 6.4 mm
0.505   MaxAperture @CurFocal: f/0.0
0.505   FocalLengthIn35mmFormat: 23 mm
0.505   LensMake:
0.505   Lens:
0.505
0.505
0.505 Makernotes:
0.505   DriveMode: -1
0.505   FocusMode: -1
0.505   MeteringMode: -1
0.505   AFPoint: -1
0.505   ExposureMode: -1
0.505   ExposureProgram: -1
0.505   ImageStabilization: -1
0.505   Lens:
0.505   LensFormat: 0,  LensMount: 43,  FocalType: 0, Undefined
0.505   LensFeatures_pre:
0.505   LensFeatures_suf:
0.505   MinFocal: 0.0 mm
0.505   MaxFocal: 0.0 mm
0.505   MaxAp @MinFocal: f/0.0
0.505   MaxAp @MaxFocal: f/0.0
0.505   MinAp @MinFocal: f/0.0
0.505   MinAp @MaxFocal: f/0.0
0.505   MaxAp: f/0.0
0.505   MinAp: f/0.0
0.505   CurFocal: 0.0 mm
0.505   CurAp: f/0.0
0.505   MaxAp @CurFocal: f/0.0
0.505   MinAp @CurFocal: f/0.0
0.505   TeleconverterID: 0
0.505   Teleconverter:
0.505   AdapterID: 0
0.505   Adapter:
0.505   AttachmentID: 0
0.505   Attachment:
0.505
0.505 ISO speed: 1000
0.505 Shutter: 1/24.0
0.505 Aperture: f/1.8
0.505 Focal length: 6.4 mm
0.505 Flash exposure compensation: 0.00 EV
0.505 Embedded ICC profile: no
0.505 Baseline exposure: 3.250
0.505 Number of raw images: 1
0.505 Thumb size:  4000 x 3000
0.505 Full size:   4000 x 3000
0.505 Image size:  4000 x 3000
0.505 Output size: 3000 x 4000
0.505 Image flip: 6
0.505 Raw colors: 3
0.505 Makernotes WB data:               coeffs                  EVs
0.505   As shot                   1.75043 1 1.91402 0    0.81  0.00  0.94  0.00
0.505
0.505 Camera2RGB matrix (mode: 1):
0.505 1.6887    -0.6238 -0.0649
0.505 -0.1948   1.3616  -0.1668
0.505 0.0022    -0.6410 1.6387
0.505
0.505 XYZ->CamRGB matrix:
0.505 0.0000    0.0000  0.0000
0.505 0.0000    0.0000  0.0000
0.505 0.0000    0.0000  0.0000
0.505
0.505 camRGB -> sRGB Matrix:
0.505 1.6887    -0.6238 -0.0649
0.505 -0.1948   1.3616  -0.1668
0.505 0.0022    -0.6410 1.6387
0.505
0.505 DNG Illuminant 1: D65
0.505 DNG Illuminant 2: Illuminant A
0.505 DNG color matrix 1:
0.505 0.8750    -0.1953 -0.1211
0.505 -0.4834   1.3740  0.0791
0.505 -0.1016   0.2666  0.4365
0.505
0.505 DNG color matrix 2:
0.505 1.7568    -0.9531 -0.1338
0.505 -0.3125   1.3408  0.0078
0.505 0.0068    0.1621  0.5195
0.505
0.505 DNG calibration matrix 1:
0.505 1.0322    0.0000  0.0000
0.505 0.0000    1.0000  0.0000
0.505 0.0000    0.0000  0.9814
0.505
0.505 DNG calibration matrix 2:
0.505 1.0322    0.0000  0.0000
0.505 0.0000    1.0000  0.0000
0.505 0.0000    0.0000  0.9814
0.505
0.505 DNG forward matrix 1:
0.505 0.6611    0.1611  0.1426
0.505 0.2363    0.7979  -0.0342
0.505 0.0059    -0.3340 1.1533
0.505
0.505 DNG forward matrix 2:
0.505 0.5020    0.2393  0.2236
0.505 0.0820    0.8564  0.0615
0.505 -0.1064   -0.7002 1.6309
0.505
0.505 Derived D65 multipliers: 1.920283 0.999304 1.578794
Reply to: LibRaw 202502 snapshot supported camera list   9 months 2 weeks ago

Please check out all the formats / crops with our RawDigger Beta:
https://www.rawdigger.com/news/rawdigger-1-4-10-beta

Reply to: LibRaw 202502 snapshot supported camera list   9 months 2 weeks ago

I am pretty sure that there are plenty of people expecting support for cameras not listed as supported - I am asking a slightly different question. I notice Nikon Z50 is supported and works, but Z50II is neither listed not works. Clearly thet images are different with respect to thumbnails. What can I as a z50II user do to help/assist with adding support for this model?

Reply to: [XTrans Sensor] is_bayer flag   10 months 6 days ago

Does this lead to any incorrect consequences?

Reply to: disappeared dcraw functionality   1 year 1 day ago

I made a powershell script to convert all raw files with dcraw-emu and use exiftool to set original capture date and assign camera icc profile to the tiff.

Reply to: disappeared dcraw functionality   1 year 4 days ago

LibRaw is opensource;

We will be glad to accept your patch that will support the functionality you need.

Reply to: disappeared dcraw functionality   1 year 4 days ago

(using github copy of dcraw.c 1.478 to highlight lines)

-p switch sets cam_profile variable: https://github.com/ncruces/dcraw/blob/master/dcraw.c#L10187

The only code line where this variable is used is apply_profile call: https://github.com/ncruces/dcraw/blob/master/dcraw.c#L10458

The apply_profile function applies the profile, not embed it: https://github.com/ncruces/dcraw/blob/master/dcraw.c#L9651

Reply to: disappeared dcraw functionality   1 year 4 days ago

The -p switch in dcraw was to apply a camera icc profile or embed

Reply to: disappeared dcraw functionality   1 year 4 days ago
why

Thanks for your reply. But the -z switch to keep capture date was in dcraw. Why is not in libraw anymore. What is the logic behind that?

Reply to: disappeared dcraw functionality   1 year 5 days ago

1) Yes, there is no code that adjusts timestamps
2) dcraw's -p camera-profile is not 'assign camera profile', but covert from camera profile to output profile. This option is supported by dcraw_emu if compiled with LCMS support

Reply to: Problems with Snapshot 202502   1 year 1 week ago

Sorry, it is of course 202502, just a mistype

Reply to: Problems with Snapshot 202502   1 year 1 week ago

I found the problem. I forgot to update the libraw header files for my project and it was using the old data structures, causing heap overflow and all sorts of weird problems.

It is all good now.

By the way, I only see 202502 snapshot on Github. Where is 202503? Is the master branch 202503? I downloaded the one from the master branch.

Thanks.

Reply to: Problems with Snapshot 202502   1 year 1 week ago

Thank you for your feedback.
1) Downloaded latest master (commit ID: ad067c510bacea51755711c1b624da78b1812fba) and commit just before 202503 snapshot (commit ID: 29d9785c2d5f71db7c6ae2834003cd211bd6a421)
2) Compiled both as make CC=clang CXX=clang -f Makefile.dist on my home FreeBSD router (14.2)
3) Checked with Fuji GFX100 test files from rawdb.dnglab.org: four compressed files and two uncompressed via

time ./bin/uncompressed_raw /path/to/*.RAF  

(to check decode time only)

Results
202403 snapshot (+all patches):

real    0m49,581s
user    0m47,898s
sys     0m1,284s

202503 snapshot + two newer changes (PhaseOne checks + CVE numbers):

real    0m44,326s
user    0m42,512s
sys     0m1,468s

The new one looks slightly faster (that could be test variation).

So, please check you're using same compile/etc/ mode for both versions (e.g. same OpenMP support: Fuji decoder is OpenMP-capable).

Regarding your 2nd complain:
It is useless to discuss colors/tint/etc without reference to specific RAW file/processing options used.
The result I see from same files set via dcraw_emu -w -T looks absolutely normal: https://www.dropbox.com/scl/fi/46fz50mtg77ddzytccbpa/Fujifilm-GFX100S-14...

Reply to: What can cause different output inside Docker container?   1 year 2 weeks ago

That means that system swab() call is broken in this specific environment. A very strange story...

Reply to: What can cause different output inside Docker container?   1 year 2 weeks ago

Alex, I'd like to confirm that your suggestion worked and the issue is now fixed.

I used the following flags in my Docker container:

ENV CFLAGS="-O2 -g -DLIBRAW_OWN_SWAB" 
ENV CXXFLAGS="-O2 -g -DLIBRAW_OWN_SWAB"
ENV LDFLAGS="-L/usr/local/lib"

With code tagged 0.21.4 found in the GitHub repo, compiled with make install.

Thank you!

Reply to: Cmake Clion Mac   1 year 2 weeks ago

LibRaw-cmake is separate project, not supported by LibRaw team (although still linked to LibRaw account on github)

Please ask your question via issues here: https://github.com/LibRaw/LibRaw-cmake

Reply to: Comprehension question to LibRaw development   1 year 3 weeks ago

0.21 branch (0.21.0....0.21.4) is based on 0.21.0 (released in 2022) and contains bugfixes and stability improvements (like move all allocations from non-initialized malloc to zero-filled calloc).
No new cameras, no new RAW formats, stability-only changes.

Snapshots contains new cameras/new raw formats support, but may be not as stable as 0.21.xx

This is explained in details in the update policy section on this site frontpage: https://www.libraw.org/#updatepolicy

Reply to: Unsupported file format or not RAW file   1 year 3 weeks ago

This is messy crap with different versions of autoconf.
Use an older one or just build via make -f Makefile.dist (you may need to edit Makefile.dist to ajust build option)

Reply to: What can cause different output inside Docker container?   1 year 3 weeks ago

Thank you for looking into this for me, Alex! I will test and get back.

Reply to: Unsupported file format or not RAW file   1 year 3 weeks ago

Hey thanks for the response. I think I've figured out the issue - libraw-dev version 0.21.3-r0 does not include the 202403 snapshot where the camera the photo was taken on is supported.

I am now trying to install and compile Libraw through master on Github. I'm doing this from an Alpine based docker image, after I clone the repo and run autoreconf --install I get the following errors

#10 22.66 configure.ac:16: error: possibly undefined macro: AC_SUBST
#10 22.66 If this token and others are legitimate, please use m4_pattern_allow.
#10 22.66 See the Autoconf documentation.
#10 22.66 configure.ac:41: error: possibly undefined macro: AC_MSG_WARN
#10 22.67 autoreconf: error: /usr/bin/autoconf failed with exit status: 1

Am I missing something, I'm following the installation from this guide here
https://www.libraw.org/docs/Install-LibRaw-eng.html

Reply to: What can cause different output inside Docker container?   1 year 3 weeks ago

Checked with LIBRAW_OWN_SWAB defined (so, own LibRaw swab used): looks OK.

So the only suspect for now: host (libc) swab() function

Recompilation with LIBRAW_OWN_SWAB should solve the issue.

Reply to: Libraw bug report - libraw crash and core dump on digikam   1 year 3 weeks ago

Looks like digikam/LibRaw interaction problem: LibRaw should not release exception out of library, while calling app should not crash on caught exception.

Could you please share the file that results with the problem described?

Reply to: Unsupported file format or not RAW file   1 year 3 weeks ago

It's hard to discuss anything without examples of problematic files on hands, please share (use any file sharing service and post link here)

Reply to: What can cause different output inside Docker container?   1 year 3 weeks ago

OK, thanks.

Looks like byte order swapped in REMOTE sample.

I'll investigate the problem in depth tomorrow.
At a 1st glance: LibRaw::read_shorts does not work as expected.

It calls libraw_swab() if host byte order does not match file byte order (this is the case: MM/Motorola byte order in file and II/intel byte order on host).

Depending on compile flags, libraw_swab is implemented in two ways:
- own code if LIBRAW_OWN_SWAB defined on compile
- host (libc) swab() function overwise.

Is there any chance to know compile flags used on DO-docker?

Pages