Cannot open RAW file from Samsung Galaxy S21 phone

I have a Samsung Galaxy S21 phone and using the default camera app, Samsung Camera, I enabled Pro mode and asked the phone to save a RAW file for every picture taken.

I tried opening one of these RAW files (saved as DNG format) with Siril and it doesn’t open, when dragging and dropping the image file to the source list, I get an error message:

“1 file was ignored while drag and drop
Files with unknown extension cannot be dropped in this area. Therefore they are ignored.”

I searched a little bit and found out that it’s actually possible to open DNG files, but Siril has a problem opening RAW files produced from phone cameras. The only topics I’ve found gave no solution and one of them even said the issue was fixed by using Siril from Flathub, which was a more recent version.

I’m running Siril 1.0.0-rc2 on Arch Linux and downloaded the software from the AUR.

Please in a first time could you test with the AppImage from the website and tell me if it works.
Second, could you share a raw file.

I tried the AppImage from the official website and it loaded the DNG file, except that there’s only a B&W layer, no color information. When I open the same file in other apps such as Darktable or RawTherapee, there is color information.

free_image_data() called, clearing loaded image
log: Decoding Samsung SM-G991B file (ISO=50, Exposure=30.0 sec)
log: Filter pattern: GRBG
log: Reading RAW: file 20220105_232105.dng, 1 layer(s), 4032x3024 pixels
Loading image OK, now displaying

20220105_232105.dng (23.6 MB)

EDIT: I applied a Debayer filter and now it loads color information but it’s too saturated when compared to Darktable/RawTherapee:


This is normal behavior. Siril open in CFA mode as default.

and when I debayer the image I’ve no issue.
Please read here: Siril - FAQ

Okay, I guess that’s not a big deal then. At least it opens DNG files.

I’ll take a look and contact the Arch package maintainer to figure out why the package from the AUR doesn’t support DNG files. It doesn’t even show as a supported image format when I click to open an image.

I think the LibRaw version is too old.

That was the problem, I didn’t have libraw installed. After installing it, I had to clean the build files and rebuild the package to include libraw.

Thanks for the help!

I took new pictures today with my phone using the Expert RAW app from Samsung after updating to Android 12. When I try to open a RAW file produced by this app or try to use it with the OSC_Preprocessing script, I get an error:

Siril cannot open this file in CFA mode (no data available). Try to switch into RGB.

I have attached the file to this post.

20220113_205854.dng (22.2 MB)

This happens because LibRaw cannot find any Raw data. So probably your file does not contain raw data, only demosaiced data.
So you can’t really do astrophotography with it.

Attached is exiftool output on this file. It is indeed an enhanced (demosaiced) “Linear Raw” (RGB already, 16-bits per channel).

20220113_205854.txt (4.4 KB)

1 Like