Bug 240749 - DNGConverter produces black files (Canon 5D mkII)
Summary: DNGConverter produces black files (Canon 5D mkII)
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Bqm-DngConverter (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-04 18:48 UTC by krzysztof pijarski
Modified: 2018-08-11 09:27 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 1.3.0


Attachments
eos5d CR2 converted with last libkdcraw from trunk (562.93 KB, image/png)
2010-06-07 07:05 UTC, caulier.gilles
Details
EOS5S open in image editor Raw Import tool (282.06 KB, image/jpeg)
2010-06-08 07:20 UTC, caulier.gilles
Details

Note You need to log in before you can comment on or make changes to this bug.
Description krzysztof pijarski 2010-06-04 18:48:43 UTC
Version:           1.3.0 (using KDE 4.4.2) 
OS:                Linux

I just decided to try the DNGConverter again, having read the whitebalance problems have been solved, and stumbled upon a problem analogous to solved Bug #217897 (on opening the given file, Eog reports: "Failed to load TIFF image: LensInfo: Rational with zero denominator (num = 0)"). 
The DNGConverter finishes without any error, but the resulting dng file is all black (tested in digikam, showfoto, rawtherapee, ufraw, rawstudio).
Showfoto doesn't seem to report any errors:
showfoto(31918)/digikam (core) Digikam::DImg::load: "/home/kris/ZDJECIA/USA/test - ts-e 24/_MG_2749.dng"  : RAW file identified
showfoto(31918)/KDCRAW KDcrawIface::KDcraw::loadFromLibraw: LibRaw: dcraw emulation:  ("-H 0", "-w", "-q 0", "-o 1", "/home/kris/ZDJECIA/USA/test - ts-e 24/_MG_2749.dng")
showfoto(31918)/KDCRAW KDcrawIface::KDcraw::loadFromLibraw: LibRaw highlights adjustements :  false
showfoto(31918)/KDCRAW KDcrawIface::KDcrawPriv::progressCallback: LibRaw progress:  Reading metadata  pass  0  of  2
showfoto(31918)/KDCRAW KDcrawIface::KDcrawPriv::progressCallback: LibRaw progress:  Reading metadata  pass  1  of  2
showfoto(31918)/KDCRAW KDcrawIface::KDcrawPriv::progressCallback: LibRaw progress:  Reading RAW data  pass  0  of  2
showfoto(31918)/KDCRAW KDcrawIface::KDcraw::loadEmbeddedPreview: Preview data size: 19293
showfoto(31918)/KDCRAW KDcrawIface::KDcraw::loadEmbeddedPreview: Using embedded RAW preview extraction
showfoto(31918)/KEXIV2 KExiv2Iface::KExiv2::getImageOrientation: Orientation => Exif.Image.Orientation =>  1
showfoto(31918)/KDCRAW KDcrawIface::KDcraw::loadEmbeddedPreview: Using embedded RAW preview extraction
showfoto(31918)/digikam (core) Digikam::DMetadata::getIccProfile: Exif color-space tag is sRGB. Using default sRGB ICC profile.
showfoto(31918)/KEXIV2 KExiv2Iface::KExiv2::getImageOrientation: Orientation => Exif.Image.Orientation =>  1
showfoto(31918)/KDCRAW KDcrawIface::KDcraw::loadEmbeddedPreview: Preview data size: 1904828
showfoto(31918)/KDCRAW KDcrawIface::KDcraw::loadEmbeddedPreview: Using embedded RAW preview extraction
showfoto(31918)/digikam (core) Digikam::DMetadata::getIccProfile: Exif color-space tag is sRGB. Using default sRGB ICC profile.
showfoto(31918)/KEXIV2 KExiv2Iface::KExiv2::getImageOrientation: Orientation => Exif.Image.Orientation =>  1
showfoto(31918)/KDCRAW KDcrawIface::KDcrawPriv::progressCallback: LibRaw progress:  Reading RAW data  pass  1  of  2
showfoto(31918)/KDCRAW KDcrawIface::KDcraw::loadFromLibraw: Disabling LibRaw highlights adjustements
showfoto(31918)/KDCRAW KDcrawIface::KDcrawPriv::progressCallback: LibRaw progress:  Scaling colors  pass  0  of  2
Scaling with darkness 0, saturation 15600, and
multipliers 2.111326 1.000000 1.848634 1.000000
showfoto(31918)/KDCRAW KDcrawIface::KDcrawPriv::progressCallback: LibRaw progress:  Scaling colors  pass  1  of  2
showfoto(31918)/KDCRAW KDcrawIface::KDcrawPriv::progressCallback: LibRaw progress:  Pre-interpolating  pass  0  of  2
showfoto(31918)/KDCRAW KDcrawIface::KDcrawPriv::progressCallback: LibRaw progress:  Pre-interpolating  pass  1  of  2
Bilinear interpolation...
showfoto(31918)/KDCRAW KDcrawIface::KDcrawPriv::progressCallback: LibRaw progress:  Interpolating  pass  0  of  3
showfoto(31918)/KDCRAW KDcrawIface::KDcrawPriv::progressCallback: LibRaw progress:  Interpolating  pass  1  of  3
showfoto(31918)/KDCRAW KDcrawIface::KDcrawPriv::progressCallback: LibRaw progress:  Interpolating  pass  2  of  3
showfoto(31918)/KDCRAW KDcrawIface::KDcrawPriv::progressCallback: LibRaw progress:  Converting to RGB  pass  0  of  2
Converting to sRGB colorspace...
showfoto(31918)/KDCRAW KDcrawIface::KDcrawPriv::progressCallback: LibRaw progress:  Converting to RGB  pass  1  of  2
showfoto(31918)/KDCRAW KDcrawIface::KDcraw::loadFromLibraw: LibRaw: data info: width= 5634  height= 3753  rgbmax= 255
showfoto(31918)/digikam (core) Digikam::IccSettingsPriv::profileFromWindowSystem: Found X.org XICC monitor profile "mojekran100128-fast"
showfoto(31918)/KEXIV2 KExiv2Iface::KExiv2::getImageDateTime: DateTime => Exif.Photo.DateTimeOriginal =>  QDateTime("Sat May 29 21:29:31 2010")

One more thing: the converted file seems strangely small. The CR2 is 26.5 mb, the uncompressed dng - 42.2, and the compressed dng - 3.5 mb. Is that possible at all with lossless compression?

I made the files available for download: http://dl.dropbox.com/u/544347/test%20-%20ts-e%2024.zip

I build digikam & kipi from svn.

Thanks!

Krzysztof


Reproducible: Always

Steps to Reproduce:
Convert a Canon 5D mkII file with DNGConverter (compressed or uncompressed). My Canon 20D files convert beautifully.

Actual Results:  
The 5D mkII file is all black.

Expected Results:  
Produce an image identical with the CR2 digital negative

-Computer-
Processor		: 2x Intel(R) Core(TM)2 Duo CPU     P8700  @ 2.53GHz
Memory		: 3775MB (2033MB used)
Operating System		: Ubuntu 10.04 LTS
Date/Time		: Fri 04 Jun 2010 12:46:29 PM EDT
-Display-
Resolution		: 1280x800 pixels
OpenGL Renderer		: GeForce 9400M/PCI/SSE2
X11 Vendor		: The X.Org Foundation
-Multimedia-
Audio Adapter		: HDA-Intel - HDA NVidia
Comment 1 Jens Mueller 2010-06-06 10:53:33 UTC
SVN commit 1135045 by jmueller:

disable encoding of full sensor image for canon as it causes problems with some models

BUGS: 240749

 M  +2 -1      NEWS  
 M  +5 -4      dngconverter/dngwriter/dngwriter.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1135045
Comment 2 Jens Mueller 2010-06-06 14:30:07 UTC
*** Bug 240750 has been marked as a duplicate of this bug. ***
Comment 3 krzysztof pijarski 2010-06-07 05:56:19 UTC
Dear Jens,

Thanks for looking into this matter! I have just recompiled and now the inages come out pink and are impossible to white balance properly... have a look: http://dl.dropbox.com/u/544347/_MG_2749.dng

Thanks!

Krzysztof
Comment 4 caulier.gilles 2010-06-07 07:05:07 UTC
Created attachment 47763 [details]
eos5d CR2 converted with last libkdcraw from trunk

I confirm that problem is reproducible with last libkdcraw + libraw from trunk
Comment 5 Jens Mueller 2010-06-07 23:09:12 UTC
Could this be the last libraw update? I tested with old libraw 0.9.1 (everything is looking normal), update only libkdcraw (internal libraw 0.10beta1), recompile and see also the red tint - but for all canon raws. When I go back to libraw 0.9.1 everything is fine again.
Comment 6 caulier.gilles 2010-06-08 00:32:03 UTC
Alex, look this thread ?

Gilles
Comment 7 krzysztof pijarski 2010-06-08 01:29:05 UTC
Dear Jens,

I think your right, I tried my canon 20D files and since the last compilation the also come out pink.
Comment 8 caulier.gilles 2010-06-08 07:20:57 UTC
Created attachment 47805 [details]
EOS5S open in image editor Raw Import tool

There is no red tint when CR2 file is open in digiKam image editor

Gilles Caulier
Comment 9 Alex Tutubalin 2010-06-08 07:37:41 UTC
I've made quick check with 5D MkII file, it looks normal with LibRaw's dcraw_emu.

Have you *full rebuild* all binaries uses libraw/libraw*h ?  The internal data structures size has changed, so you need to full cleand and recompile.
Comment 10 Jens Mueller 2010-06-08 08:24:11 UTC
Libraw inline processing of canon files is fine with the new version (0.10beta1), but pure raw data extraction is faulty since then (all canon raws get this red tint).
Comment 11 Alex Tutubalin 2010-06-08 08:46:01 UTC
Jens,
is it possible to reproduce the problem using only LibRaw samples? Don't want to build entire KDE structure to reproduce the problem.

The problem may be by new black level processing code (4-channel separate black levels).