Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JPEG XL .DNG not supported #16618

Closed
nghiatranol opened this issue Apr 15, 2024 · 9 comments
Closed

JPEG XL .DNG not supported #16618

nghiatranol opened this issue Apr 15, 2024 · 9 comments

Comments

@nghiatranol
Copy link

Describe the bug

We have tried to open the DNG file (which is the input.dng in the zip) in darktable without any success, the error just said that darktable cannot load the file

input.zip

image

Steps to reproduce

  1. Open darktable desktop app
  2. Click on 'add to library'
  3. Choose the file input.dng
  4. Click on 'add to library' in the popup
    ---> the error message shows up

Expected behavior

darktable should be able to open the file

Logfile | Screenshot | Screencast

this is the log file from https://www.darktable.org/about/faq/#:~:text=Windows%2010%3A%20C%3A%5CUsers%5C%5Busername%5D%5CAppData%5CLocal%5CMicrosoft%5CWindows%5CINetCache%5Cdarktable%5Cdarktable%2Dlog.txt

darktable-log.txt

Commit

No response

Where did you obtain darktable from?

downloaded from www.darktable.org

darktable version

4.6.1

What OS are you using?

Windows

What is the version of your OS?

windows 11 pro

Describe your system?

No response

Are you using OpenCL GPU in darktable?

None

If yes, what is the GPU card and driver?

No response

Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip

No response

@ralfbrown
Copy link
Collaborator

A quick look shows the file to have been generated by Lightroom. RawSpeed complains that it can't find any RAW chunks (since LR generated it, it's probably demosaiced), and ImageMagick complains that it can't handle floating-point samples. You probably need to adjust the export settings in LR.

@pehar1
Copy link

pehar1 commented Apr 15, 2024

And the file contains lots of doubled tags, some of them inconsistent, see for example "Bits Per Sample" from the extract of the exif data :

...
[EXIF]          0x0102 Bits Per Sample                 : 8 8 8                                                 
[EXIF]          0x0103 Compression                     : JPEG                                                  
[EXIF]          0x0106 Photometric Interpretation      : YCbCr                                                 
[EXIF]          0x010f Make                            : SONY                                                  
[EXIF]          0x0110 Camera Model Name               : ILCE-7M4                                              
[EXIF]          0x0111 Preview Image Start             : 140700                                                
[EXIF]          0x0112 Orientation                     : Horizontal (normal)                                   
[EXIF]          0x0115 Samples Per Pixel               : 3                                                     
[EXIF]          0x0116 Rows Per Strip                  : 171                                                   
[EXIF]          0x0117 Preview Image Length            : 9168                                                  
[EXIF]          0x011c Planar Configuration            : Chunky                                                
[EXIF]          0x0131 Software                        : Adobe Photoshop Lightroom Classic 13.1 (Macintosh)    
[EXIF]          0x0132 Modify Date                     : 2024:03:05 08:59:35                                   
[EXIF]          0x00fe Subfile Type                    : Full-resolution image                                 
[EXIF]          0x0100 Image Width                     : 7008                                                  
[EXIF]          0x0101 Image Height                    : 4672                                                  
[EXIF]          0x0102 Bits Per Sample                 : 16 16 16
...

The sample format is

[EXIF] 0x0153 Sample Format : Float; Float; Float

which is not supported by ImageMagick (error message from your log file)

Magick: Sorry, can not handle images with IEEE floating-point samples. ().

@kmilos
Copy link
Contributor

kmilos commented Apr 15, 2024

Float DNGs are in principle supported*, and this shouldn't end up w/ the GraphicsMagick/ImageMagick loader anyway, something else fails earlier. I'll check...

*Is this a from a very recent Lightroom? Latest DNG 1.7 w/ JPEG XL compression is not yet supported.

@kmilos
Copy link
Contributor

kmilos commented Apr 15, 2024

Yep:

SubfileType                     : Full-resolution image
ImageWidth                      : 7008
ImageHeight                     : 4672
BitsPerSample                   : 16 16 16
Compression                     : JPEG XL
PhotometricInterpretation       : Linear Raw

P.S. @pehar1 There are multiple IFDs (subimages like thumbnails and main image), and each has its own tags so there is no wonder you see them as "duplicated". In exiftool you need to use -g1 or -G1 to group them by IFD.

@kmilos
Copy link
Contributor

kmilos commented Apr 15, 2024

@nghiatranol Please upload a sample to https://raw.pixls.us/ @LebedevRI

In the meantime, try exporting w/ DNG 1.6 (or earlier) compatibility.

Tracked by darktable-org/rawspeed#516

@LebedevRI LebedevRI changed the title Cannot open a specific DNG file in darktable JPEG XL .DNG not supported Apr 15, 2024
@LebedevRI
Copy link
Member

I've verified some sample that claimed to be an JXL DNG, so that's nice, thank you!
(i really need to redesign the admin for RPU...)

Is there a library that supports that compression?
If someone wants, it should be relatively rather straight-forward to implement,
just follow what is done for jpeg and deflate...

@kmilos
Copy link
Contributor

kmilos commented Apr 17, 2024

Is there a library that supports that compression?

Yes, listed a couple of options in the RawSpeed tracking issue.

@kmilos
Copy link
Contributor

kmilos commented Apr 17, 2024

I've verified some sample that claimed to be an JXL DNG

Hm, the one I see listed on RPU ("Canon - EOS 7D Mark II - 16bit (3:2).dng") does claim it is DNG 1.7, but it is not JPEG XL compressed?

Copy link

This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants