Bug 215770 - png files can't be rotated without help of imagemagick
Summary: png files can't be rotated without help of imagemagick
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-DImg-PNG (show other bugs)
Version: 1.9.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-23 02:22 UTC by Patrick Spendrin
Modified: 2017-07-30 16:15 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.6.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Spendrin 2009-11-23 02:22:08 UTC
Version:            (using Devel)
OS:                MS Windows
Installed from:    Compiled sources

On windows no imagemagick is available by default. Thats why it should be possible to rotate tiff and png images even without imagemagick.
Comment 1 Patrick Spendrin 2009-11-23 03:02:26 UTC
I was looking at bug 123499 and it seems it still stems from KDE 3 times.
Maybe the old solution using QImage could be used if ImageMagick is not available. Also I would rather like to test if the bug is fixed in Qt, and if not make them fix it...
Comment 2 caulier.gilles 2009-11-23 06:25:14 UTC
Patrick,

Qimage way is wrong, because it do not support 16 bits color depth image.

To handle PNG and TIFF, 2 image loader need to be written to not use ImageMagick. Image writter are already done using libtiff and libpng :

http://websvn.kde.org/trunk/extragear/graphics/kipi-plugins/common/libkipiplugins/kpwriteimage.cpp?view=markup

Take a look to digiKam core, which have already this code. Of course, kipi-plugins don't need a complex loader like this...

http://websvn.kde.org/trunk/extragear/graphics/digikam/libs/dimg/loaders/

Gilles
Comment 3 Patrick Spendrin 2009-11-23 18:49:29 UTC
Well, the main problem is that neither libtiff nor libpng do support transformations themselves. This would mean that one would need to read the files into a bitmap, write a transform function which acts uppon bitmaps and then write back the bitmaps to their respective formats, right?
Couldn't we rather check if the files are != 16bit and fall back to ImageMagick in case they are?
Comment 4 caulier.gilles 2009-11-23 22:24:54 UTC
Yes, libtiff and libpng do not support image transformations. And yes, whole image need to be read and write back.

There is not only 8 or 16 bits images color depth. There is also all color space supported by TIFF for example, outside RGB. QImage only support RGB. This is a big problem.

Gilles Caulier
Comment 5 caulier.gilles 2011-12-20 17:28:01 UTC
Ananta,

This file still valid using kipi-plugins 2.4 ?

Gilles Caulier
Comment 6 caulier.gilles 2012-01-25 08:35:09 UTC
digiKam now use a dedicated solution from core implementation to rotate/flip images without imagemagick. digiKam do not use kipi JPEGLossLess tool (it's disabled).

The advantage is to process file in parallele if you have more than one CPU and to use image versionning feature from digiKam.

This will be avaialble in next digiKam 2.6.0 release.

Gilles Caulier