Bug 304242 - BQM DNG tool : Ricoh GRD4 DNG file converted to compressed DNG has wrong colors
Summary: BQM DNG tool : Ricoh GRD4 DNG file converted to compressed DNG has wrong colors
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Unclassified
Component: Plugin-Bqm-DngConverter (show other bugs)
Version: 4.11.0
Platform: Ubuntu Packages Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-29 14:10 UTC by Michal Thoma
Modified: 2020-08-03 05:02 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.8.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Thoma 2012-07-29 14:10:24 UTC
I tried to convert my Ricoh GRD 4 DNG files to compressed full preview DNG files using DNG converter. The result image has wrong colors in thumbnail, preview and RAW data (regardless what RAW decoding SW is used). Seems like color matrices are not transferred properly or something different is wrong.
The sample files are here: http://download.thoma.cz/dng-color-shift.zip

Reproducible: Always
Comment 1 caulier.gilles 2012-07-29 15:46:20 UTC
Colors matrix to process DNG is provided by libraw. Each camera as a dedicated matrix. Perhaps your camera is not in the list of supported device from libraw.

Go to digiKam Help/RAW Camera support and take a look.

Also let's me hear which libraw you use (look dialog info for details)

Gilles Caulier
Comment 2 Michal Thoma 2012-07-30 05:18:06 UTC
Shouldn't there be some warning that the camera's RAW is unsupported?

AFAIK Adobe's DNG Converter will not process unsupported RAW.
Comment 3 caulier.gilles 2012-07-30 10:05:15 UTC
We have a test application running in console to check processing :

unnamed app(3121)/KIPI (general) DNGIface::DNGWriter::convert: DNGWriter: Raw data loaded:
unnamed app(3121)/KIPI (general) DNGIface::DNGWriter::convert: --- Data Size:      20181312  bytes                                          
unnamed app(3121)/KIPI (general) DNGIface::DNGWriter::convert: --- Date:           "2012-07-07T03:13:52"                                    
unnamed app(3121)/KIPI (general) DNGIface::DNGWriter::convert: --- Make:           "RICOH"                                                  
unnamed app(3121)/KIPI (general) DNGIface::DNGWriter::convert: --- Model:          "GR DIGITAL 4"                                           
unnamed app(3121)/KIPI (general) DNGIface::DNGWriter::convert: --- ImageSize:      3672 x 2748                                              
unnamed app(3121)/KIPI (general) DNGIface::DNGWriter::convert: --- FullSize:       3672 x 2748                                              
unnamed app(3121)/KIPI (general) DNGIface::DNGWriter::convert: --- OutputSize:     3672 x 2748                                              
unnamed app(3121)/KIPI (general) DNGIface::DNGWriter::convert: --- Orientation:    0                                                        
unnamed app(3121)/KIPI (general) DNGIface::DNGWriter::convert: --- Top margin:     0                                                        
unnamed app(3121)/KIPI (general) DNGIface::DNGWriter::convert: --- Left margin:    0                                                        
unnamed app(3121)/KIPI (general) DNGIface::DNGWriter::convert: --- Filter:         "RGGBRGGBRGGBRGGB"                                       
unnamed app(3121)/KIPI (general) DNGIface::DNGWriter::convert: --- Colors:         3                                                        
unnamed app(3121)/KIPI (general) DNGIface::DNGWriter::convert: --- Black:          0                                                        
unnamed app(3121)/KIPI (general) DNGIface::DNGWriter::convert: --- White:          4095                                                     
unnamed app(3121)/KIPI (general) DNGIface::DNGWriter::convert: --- CAM->XYZ:                                                                
unnamed app(3121)/KIPI (general) DNGIface::DNGWriter::convert:                     "0.0000  0.0000  0.0000"                                 
unnamed app(3121)/KIPI (general) DNGIface::DNGWriter::convert:                     "0.0000  0.0000  0.0000"                                 
unnamed app(3121)/KIPI (general) DNGIface::DNGWriter::convert:                     "0.0000  0.0000  0.0000"                                 
unnamed app(3121)/KIPI (general) DNGIface::DNGWriter::convert:                     "0.0000  0.0000  0.0000"                                 
unnamed app(3121)/KIPI (general) DNGIface::DNGWriter::convert: DNGWriter: DNG memory allocation and initialization
unnamed app(3121)/KIPI (general) DNGIface::DNGWriter::convert: DNGWriter: DNG Negative structure creation
unnamed app(3121)/KIPI (general) DNGIface::DNGWriter::convert: DNGWriter: Warning, camera XYZ Matrix is null
unnamed app(3121)/KIPI (general) DNGIface::DNGWriter::convert: DNGWriter: Updating metadata to DNG Negative

The matrix is null. Your camera model is not supported by libraw. I agree, this must report an error instead a warning...

Anyway, if you want to see your camera supported in the future, report this problem to libraw.org project. Thanks in advance

Gilles
Comment 4 caulier.gilles 2012-07-30 11:13:44 UTC
Git commit a7895789ff24a80b6fec9a9e0bacf495a53b46e5 by Gilles Caulier.
Committed on 30/07/2012 at 13:12.
Pushed by cgilles into branch 'master'.

If Color matrix is not supported by libraw to process RAW file to DNG, report an error and cancel processing.
Report error string to listview.
FIXED-IN: 2.8.0

M  +31   -31   dngconverter/dngwriter/dngwriter.cpp
M  +9    -0    dngconverter/dngwriter/dngwriter.h
M  +8    -2    dngconverter/plugin/actions.h
M  +7    -9    dngconverter/plugin/actionthread.cpp
M  +6    -6    dngconverter/plugin/actionthread.h
M  +26   -3    dngconverter/plugin/batchdialog.cpp
M  +1    -1    dngconverter/plugin/batchdialog.h

http://commits.kde.org/kipi-plugins/a7895789ff24a80b6fec9a9e0bacf495a53b46e5
Comment 5 Michal Thoma 2012-08-22 03:08:24 UTC
Maybe the issue should be reopened. I reported missing camera support on LibRaw project as suggested (see http://www.libraw.org/node/1667 ) but was told that actually LibRaw supports the Ricoh. Actually it makes a lot of sense, because the Digikam editor opens Ricoh GRD4 raws without problem. Only problem is with DNG Converting.
Comment 6 caulier.gilles 2015-05-18 10:43:48 UTC
Michal,

This file still valid using last kipi-plugins 4.10.0 ?

Gilles Caulier
Comment 7 Michal Thoma 2015-05-19 10:51:02 UTC
The original problem (wrong colors) is gone, but now, the DNG converter will not convert the file at all with "File not supported" error message.
Comment 8 caulier.gilles 2015-05-19 11:01:16 UTC
Where did you see this message exactly ?

Don't forget that plugin use libraw in background to extract RAW data from file. Libraw has 2 extensions not published in standard to handle more RAW type and more demosaicing algorithms.

You must to be sure that all libraw extensions are installed on your computer.

Gilles Caulier
Comment 9 Michal Thoma 2015-05-19 11:23:33 UTC
The message show in the DNG Converter window in "Status" row. I have not much idea about 2 LibRaw extensions you're talking. I have installed libraw 0.15.4 from main Ubuntu Trusty repository (libraw9 package).
Comment 10 caulier.gilles 2015-05-19 11:35:11 UTC
http://www.libraw.org/download

There are 2 packs proposed as separated tarball. Please check if both are installed on your system.

Gilles Caulier
Comment 11 Michal Thoma 2015-05-19 11:49:21 UTC
I think these packages are not installed, I have only this:
http://packages.ubuntu.com/source/trusty/libraw
Comment 12 caulier.gilles 2015-06-26 13:47:20 UTC
New Kipi-plugins 4.11.0 is available :

https://www.digikam.org/node/740

Can you reproduce the problem with this release ?

Gilles Caulier
Comment 13 Michal Thoma 2015-06-26 19:17:16 UTC
The problem persist with 4.11.0. Actually DNG from new Ricoh GR Digital camera is affeced too.

DNG file from Ricoh GR IV for testing can be downloaded here:

http://img.photographyblog.com/reviews/ricoh_gr_digital_iv/sample_images/ricoh_gr_digital_iv_16.dng
Comment 14 caulier.gilles 2016-11-25 16:09:33 UTC
Any feedback with current AppImage bundle for Linux ?

https://drive.google.com/drive/folders/0BzeiVr-byqt5Y0tIRWVWelRJenM

Gilles Caulier