Bug 282101 - Converting Canon CR2 images result in empty images
Summary: Converting Canon CR2 images result in empty images
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: BatchQueueManager-RAWProcessing (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-15 20:24 UTC by Erik Trædal
Modified: 2016-07-18 04:39 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.2.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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