Bug 282101

Summary: Converting Canon CR2 images result in empty images
Product: [Applications] digikam Reporter: Erik Trædal <erik.traedal>
Component: BatchQueueManager-RAWProcessingAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: bbroek02, caulier.gilles, lexa, tschenser
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 2.2.0

Description Erik Trædal 2011-09-15 20:24:10 UTC
Version:           2.1.1 (using KDE 4.6.2) 
OS:                Linux

When trying to convert Canon CR2 images from my D50 camera, the DNG images all turn up just black. The size is also quite small compared to the expected result.

This issue first occurred after upgrade to Digikam 2.1, but also exist in 2.11 and git.

I have tested wit images I successfully converted earlier, and they also fail now.



Reproducible: Always

Steps to Reproduce:
Try to convert a CR2 image to DNG (I have only tried using pictures from my own camera)

Actual Results:  
The resulting DNG image is all black

Expected Results:  
Create a DNG image with all the picture information

Console output when trying to convert an image:
No itemShortInfo could be retrieved from the database for image "IMG_4352.dng" 
digikam(12546)/digikam (core) Digikam::CollectionScanner::scanAlbum: Folder does not exist or is not readable:  "/home/storage/pix/raw/2011-09-11/.kipi-dngconverter-tmp-1316115460"
Comment 1 caulier.gilles 2011-09-15 21:23:07 UTC
Yes, i confirm...
Comment 2 caulier.gilles 2011-09-16 03:51:48 UTC
*** Bug 282116 has been marked as a duplicate of this bug. ***
Comment 3 caulier.gilles 2011-09-16 20:20:12 UTC
Git commit ae78cef6b50a82007e2afef81a0326b3b5c50ee6 by Gilles Caulier.
Committed on 16/09/2011 at 22:16.
Pushed by cgilles into branch 'master'.

do not use prefix operator with pointer. this doesn't work, at least with DNG converter. The result image is a black hole.
BUGS: 282101
CCMAIL: andi.clemens@googlemail.com

M  +2    -2    libkdcraw/kdcraw.cpp

http://commits.kde.org/libkdcraw/ae78cef6b50a82007e2afef81a0326b3b5c50ee6
Comment 4 Alex Tutubalin 2011-09-17 05:50:57 UTC
Gilles, 

please remove the '*' operator too, it confuses possible code editors:

*output++; // * is useless here and produces compiler warning
change to
 output++;
Comment 5 caulier.gilles 2011-09-17 07:11:15 UTC
Git commit df908fc170246268d6a6a4a24a01aa8da5832577 by Gilles Caulier.
Committed on 17/09/2011 at 09:10.
Pushed by cgilles into branch 'master'.

polish
CCBUGS: 282101

M  +2    -2    libkdcraw/kdcraw.cpp

http://commits.kde.org/libkdcraw/df908fc170246268d6a6a4a24a01aa8da5832577
Comment 6 Ismail Donmez 2011-09-17 08:29:06 UTC
These changes seems to be in libkdcraw 4.7.1 already, why not import the new code?
Comment 7 caulier.gilles 2011-09-17 08:52:02 UTC
Yes, this patch must be backported to previous releases.

Gilles Caulier