Bug 154753

Summary: Add support for JPEG data precision 12
Product: [Applications] digikam Reporter: Richard Körber <kde>
Component: Showfoto-LoadAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED INTENTIONAL    
Severity: wishlist CC: caulier.gilles
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 7.6.0
Sentry Crash Report:

Description Richard Körber 2007-12-28 14:30:03 UTC
Version:            (using KDE KDE 3.5.8)
Installed from:    Fedora RPMs
OS:                Linux

Please add support for JPEG images with data precision 12.

Rationale: Plustek film scanners are bundled with a scan software called SilverFast. This software supports 48 bit color depth. Anyhow it only allows to save the full color range as a proprietary TIFF file, or as JPEG with data precision 12. (Sadly there is no SANE driver for the Plustek scanner available.)

I would like to use SilverFast to scan with the full 48 bit color depth, but do the post processing (like color correction) with showFoto due to its superior algorithms.

I can provide test images upon request.

Medical pictures also seem to use data precision 12, e.g. for xray images.

This bug is somewhat related to bug 112801, but there it was only asked to ignore images with data precision 12.
Comment 1 Gerhard Kulzer 2007-12-28 15:51:09 UTC
The 12-bit jpeg format is used and known in the medical context only, it is very rarely used in fact (http://en.wikipedia.org/wiki/Jpeg#Medical_imaging:_JPEG.27s_12-bit_mode).
I wonder if it's worth while the effort. 

I don't believe (although I'm not certain) that tiff is proprietary. It is copyrighted by Adobe, which is not the same thing, and it is not patented.

What you can do to avoid tiff is this: save your scan into tiff and convert them straight away into png with Imagemagick: $ mogrify -format tiff  *.png

Gerhard
Comment 2 Marcel Wiesweg 2007-12-28 19:11:07 UTC
Does anyone know if these JPEGs are supported by libjpeg?
If it is, then it might be pretty easy to support; If there is not library to read them, we will certainly not support it.
Comment 3 caulier.gilles 2007-12-29 20:18:59 UTC
Hi Marcel,

If i remember libjpeg do not support more than 8 bits color depth. In fact, the libjpeg is not maintained anymore and do not implement all JPEG spec...

To have checked DNG SDK from Adobe, there is a fork of libjpeg inside where 16 bits color depth + lossless compression have been added. But the main problem with this implementation is the license : non GPL like...

Code is interesting to study if you is curious. Look here:

http://www.adobe.com/support/downloads/dng/dng_sdk.html

Gerhard, for me, this file cannot be solved easily...

Gilles
Comment 4 Richard Körber 2007-12-30 01:18:23 UTC
In the meantime I have found out that the TIFF file produced by the bundled scanning software, is indeed not proprietary. It is just unprocessed, i.e. if I scan a negative film, the resulting TIFF file is readable, but needs to be properly inversed and color corrected. If I scan a slide, the resulting TIFF is already useable by showFoto.

12 bit JPEG support would still be a nice feature, though. But if it is not a trivial task, I agree that it probably isn't worth the effort. I wouldn't mind if you close this bug as WONTFIX.
Comment 5 caulier.gilles 2008-01-04 11:16:03 UTC
Accorndinly with #4, i close this entry as won't fix.

If 12 bits color depth is important for you, i recommend to use PNG or TIFF file format witch support it without problem under linux (and with digiKam of course)

Gilles Caulier