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
Raw formats (DNG, GPR, NEF) #6482
Comments
When I inspect the image with However, I also see that it has child images - two reduced resolution images, called JpgFromRaw and OtherImage, and one full resolution image that is 6016x4016. So I don't know that Pillow is necessarily doing anything wrong. Would you like to instead request that Pillow provide an API to access those child images? |
That's interesting, I didn't know about that, thanks for explaning.
That would be great. |
I guess Pillow only ever tries to access the root IFD (IFD0) of a TIFF-based file, and that's a sensible assumption IMHO. For most camera raw images, the root IFD is the JPEG thumbnail (I guess it makes it easy for image viewers and file managers to access as well). If you want to work w/ camera raw images, you're much better of working w/ |
It turns out that even with support for child images, the files provided here fail to load. sample.dng has five child images. One of the child images fails to load with
and three fail with because Pillow does not currently support Lossy JPEG compression.
sample2.NEF has 3 child images. One of them fails because Pillow does not currently support Nikon NEF compression.
|
I've created PR #6569 to add reading of TIFF child images. |
Even with
|
#3962 has a request for a related format - GPR.
|
#7487 requests support for LinearRaw Photometric Interpretation, part of the DNG specification. |
What did you do?
I opened the images using Pillow and printed their detected size.
What did you expect to happen?
The size to be reported correctly. This causes conversions to JPEG to be way too small.
What actually happened?
Size was reported incorrectly.
What are your OS, Python and Pillow versions?
Interestingly the
file
command also shows the wrong sizes:While inspecting the files with Dolphin shows the correct sizes:
sample.dng
sample2.NEF
The text was updated successfully, but these errors were encountered: