[Digikam-devel] JPEG lossless crop

Gilles Caulier caulier.gilles at free.fr
Tue Jan 3 19:35:36 GMT 2006


Le Mardi 3 Janvier 2006 18:56, Sebastian Röder a écrit :
> First a happy new year to the digikam team - may it not be totaly
> overworked in 2006 by the ambitious digikam project.

Thanks.

>
> During christmas holidays I prepared some digikam photos for print. That
> means I used the crop w/ ascect ratio to transform them from 4:3 to 3:2
> ascpect ratio. Sadly this transformation is not lossless in digikam. 

No. Image editor work only on decode image data in RAW format, not directly 
with JPEG file (in your case).

Crop tool working with RAW data (decode by jpeg loader). the image alterations 
result of jpeg re-encoding when file is saved because... JPEG file format is 
_NOT_ a loss less file format !!! If you want more inforamtions about how to 
manage _properly_ your images, take a look in digikam handbook :

http://docs.kde.org/development/en/extragear-graphics/digikam/index.html

To reduce JPEG alteration, use an adapted compression level  in settings 
dialog... but this way isn't the ultimate solution : you need to use a loss 
less file format like PNG or TIFF to manipulate/transform your images. JPEG 
file format is dedicaced to web image publishing, not image 
transformations !!!

> That's 
> bad cause the photo quality is important in this case (print) and no other
> effects were used. So if one could do the crop lossless  the image quality
> would not descrease.
>
> Using another file format is not an option here cause the print houses
> expect jpeg and I don't want it to be to complicated (have to explain it to
> my parents who are not that familar with computers).

no and no. This task will not be complicated when on the fly image files 
conversion will be implemented in camera interface (typically to convert JPEG 
to PNG of TIFF) without lost all meta-data, ICC profiles, embedded thumbs, 
etc. It's planed to digiKam 0.9.x series...

>
> I googled a bit and found out that a lossless crop function was implemented
> in jpegtran (on Gentoo part of the "jpeg" package). Now my question is
> whether there is a chance to implement this in digikam/image
> plugins/kipi-plugins whatever (sorry but I do not have an overview about
> the digikam packages anymore).

Only batch rotation operations from main interface (using a kipi plugin) are 
loss less with JPEG. This is have no sence to create a crop image tool in 
kipi without to have an interaction with user like in image editor...

regards

Gilles Caulier



More information about the Digikam-devel mailing list