Bug 149358

Summary: digiKam is slower to rotate photos
Product: [Applications] digikam Reporter: Alain Knaff <kde>
Component: Plugin-Bqm-RotateAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal CC: caulier.gilles
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 7.6.0
Sentry Crash Report:

Description Alain Knaff 2007-08-29 22:42:34 UTC
Version:           0.9.2-final (using KDE 3.5.7, Kubuntu (gutsy) 4:3.5.7-1ubuntu14)
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.22-10-generic

Kuickshow has near-instantaneous photo rotate. Would it be possible to get that same algorithm in digikam? I'm not sure how kuickshow is doing it (maybe only rotate the thumbnail in real time, and then do the real rotation in the background while the user is busy with something else?), but it feels *much* snappier than digikam when rotating photos.

Moreover, when batch-rotating several photos, would it be possible to spawm 2 threads, in order to take advantage of dual-core processors?
Comment 1 caulier.gilles 2007-08-30 06:28:43 UTC
Alain,

This file is invalid, Kuickshow use imlib library to process image rotation which is not lossless with JPEG and do not support 16 bits color depth images. digiKam use a kipi-plugin to rotate image which support  lossless transformations of JPEG and suport 16 bits color depth using ImageMagick with others file formats.

Gilles Caulier
Comment 2 Kusi 2007-09-02 00:17:58 UTC
rotating 7 images with jpegtran takes 4.1 sec on my computer while rotating the same images with digikam (jpeglossless kipi) takes around 9 sec. So the kipi plugin is twice as slow as it would be possible. This bugreport is still valid in my opinion

Kusi
Comment 3 caulier.gilles 2007-09-02 09:26:25 UTC
Alain,

JPegLossLess kipi plugins use JPEGTrans source code internally...

Gilles  Caulier
Comment 4 Kusi 2007-09-02 12:38:01 UTC
Gilles, 

so what is the reason why it takes twice as much time for the kipi plugin compared to the commandline tool, if both use the same code base?

Kusi

PS: I tested the speed with the following bash-script

for i in *.jpg
do
  jpegtran -rotate 90 $i > rotated/$i
done