Skip to content
This repository has been archived by the owner on Jul 22, 2018. It is now read-only.

Incorrect decoding of some DNG files #45

Closed
LibRaw opened this issue Aug 20, 2014 · 2 comments
Closed

Incorrect decoding of some DNG files #45

LibRaw opened this issue Aug 20, 2014 · 2 comments

Comments

@LibRaw
Copy link

LibRaw commented Aug 20, 2014

RawSpeed (master branch, have not tested develop branch) decode some DNG files incorrectly.
I was unable to quickly find the problem, so the bug report here.

Sample file: https://www.dropbox.com/s/t08h2djogfcti06/DR100.dng
It decodes this way: https://www.dropbox.com/s/cjy1987itfeq2ga/Screenshot%202014-08-20%2014.25.51.png
While LibRaw/dcraw do it right: https://www.dropbox.com/s/cie45bwudlr5ksx/Screenshot%202014-08-20%2014.25.26.png

All files I have are from Fuji cameras, converted from RAF to DNG by Adobe DNG Converter 8.x
These files are 'normal bayer', not X-Trans or 'rotated' SuperCCD.

@LibRaw
Copy link
Author

LibRaw commented Aug 24, 2014

Followup: this is because these DNG files use SamplesPerPixels tag equal to 2 (so, each pixel contains values for two sub-images used in Fuji format).
LibRaw/dcraw skips second sub-image, while RawSpeed decodes two values into two pixels.

klauspost added a commit that referenced this issue Jan 4, 2015
Fixes decoding of Fujifilm FinePix X10 DNG, but note that images are delivered with 2 samples per pixel, which will likely need adjustments to work in your application.

Fixes Issue #45.
@klauspost
Copy link
Owner

Fixed in 8bff993

Note, that I do NOT discard values, so if you need the same output, you would need to discard them with a conversion. For these images RawImage->getCpp() will return 2 and RawImage->isCFA will be true.

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

No branches or pull requests

2 participants