Bug 150063 - Rotating JPEG produces error and truncates original file
Summary: Rotating JPEG produces error and truncates original file
Status: RESOLVED WORKSFORME
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Bqm-Rotate (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-21 15:04 UTC by Paul Waldo
Modified: 2018-03-23 12:07 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 0.1.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Waldo 2007-09-21 15:04:45 UTC
Version:           0.9.2-final (using KDE 3.5.6, Kubuntu (feisty) 4:3.5.6-0ubuntu14.1)
Compiler:          Target: x86_64-linux-gnu
OS:                Linux (x86_64) release 2.6.20-16-generic

I downloaded a JPEG image (in portrait format) from my Canon Digital Rebel.  The thumbnail was rotated properly in Digikam.  I copied the source image to another location to do some work on it.  The copied image was not rotated; it appeared in landscape mode rotated 90 degrees.  I went back to digikam, right clicked the image and selected Rotate|Left.  I got an error dialog stating 
"Rotating image XXX.jpg.  
Failed to Rotate image.  
Cannot update source image".  

Note that files are stored on a CIFS share, but digikam database is stored locally with a symlink.

There are two issues here:
- For some reason the image could not be rotated.
- More importantly, the original image is allowed to be corrupted!
Comment 1 caulier.gilles 2007-09-21 15:24:19 UTC
Paul, 

You use JPEGLossLess kipi-plugin to perform rotation. Which version of kipi-plugins you use (warning : kipi-plugins != libkipi)

Also, give us the error messages in the console.

Note : the rotation is performed in a temp file (generally somewhere in /tmp - it's drived by KDE API) and later copied to destination folder to overwrite original file.

I have never tested to use kipi-plugins on a CIFS file system.

Gilles Caulier
Comment 2 Paul Waldo 2007-09-21 16:38:12 UTC
Here is my kipi-plugin info:
$ dpkg -l kipi-plug\*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name               Version            Description
+++-==================-==================-====================================================
ii  kipi-plugins       0.1.4-0ach0feisty1 image manipulation/handling plugins for KIPI aware p
ii  kipi-plugins-doc   0.1.4-0ach0feisty1 kipi-plugins documentation


I get no error on the console.  I re-did the operation and here is all I get:
$ digikam&
Found dcraw version: 8.60
Exif Orientation: 8
Exif Orientation: 8
Exif orientation tag set to: 1
Comment 3 caulier.gilles 2007-09-26 14:22:16 UTC
Paul,

I have fixed several problems in JPEGLossLess kipi-plugin, especially about to handle temp file used during pictures transformations.

http://websvn.kde.org/branches/extragear/kde3/libs/kipi-plugins/jpeglossless/

Please can you try to checkout current kipi-plugins implementation from KDE3 svn repository, recompile and re-install it to try again. 

Look on kipi-plugins web site for more details :

http://www.kipi-plugins.org/drupal/?q=node/4

Thanks in advance

Gilles Caulier
Comment 4 Paul Waldo 2007-10-03 15:43:35 UTC
Checked SVN code, and rotation on CIFS works just fine.  Thanks for the quick turn-around!