Bug 138766 - JPEG Rotations: Give a warning when doing Lossy rotations (and offer to do lossless when applicable)
Summary: JPEG Rotations: Give a warning when doing Lossy rotations (and offer to do lo...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-DImg-JPEG (show other bugs)
Version: 7.2.0
Platform: Microsoft Windows Microsoft Windows
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-13 19:11 UTC by Ar
Modified: 2022-01-07 05:21 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 0.9.4


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ar 2006-12-13 19:11:03 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    Compiled From Sources
OS:                Linux

I'm using Digikam 0.9.0 RC2. There are multiple ways to do image rotations: from the Album GUI, from the Editor (two entries in the menu), possibly more. (not counting free rotation, which is always lossy for jpeg)

I heard one of kipilugins does lossless rotations. I have compiled and installed kipiplugins SVN, but as a newbie user, I have no idea when (and if) this kipiplugin is being used when I rotate the image inside digikam.

I'd like Digikam to clearly tell me, when I rotate a jpeg, if the rotation is Lossy or Lossless. And of course I'd prefer it to do lossless whenever possible.

GThumb tells me this (I'm using Edgy official version), when chose rotate and select the angle, the dialog clearly tells me my rotation is lossless. So for now I am using GThumb to do rotations of 45degree multiples, because I am not sure what DigiKam is doing, which is cumbersome.

Thanks!
Comment 1 caulier.gilles 2006-12-13 19:55:45 UTC
No, no, no :

From Album GUI, the JPEG rotation is lossless.

From Editor all rotation are lossless. You loss quality if you rencode an image to JPEG.

In fact all image transformations must be done on lossless format (use PNG conversion from Camera Gui to convert JPEG files for example).

Gilles
Comment 2 Ar 2006-12-13 22:06:46 UTC
I'm confused :)

So what is the "lossless jpeg rotation" kipiplugin supposed to do?

Thanks!
Comment 3 caulier.gilles 2006-12-14 07:55:16 UTC
Ari,

kipi-plugins jpeglossless rotate JPEG image using an lossless algorithm derived from JPEGTrans tool implementation :

http://websvn.kde.org/trunk/extragear/libs/kipi-plugins/jpeglossless/transupp.cpp?rev=575369&view=auto

In digiKam core, camera gui use the same implementation to autorate JPEG file lossless :

http://websvn.kde.org/trunk/extragear/graphics/digikam/libs/jpegutils/transupp.cpp?rev=575363&view=auto

Gilles
Comment 4 Colin Guthrie 2006-12-14 11:15:05 UTC
Gilles,

Could you not do something clever in the GUI?

If the user has not made any modifications to the image yet, you could effectively close the image, do the lossless rotation, and reopen the file again?

Keeps the fidelity as high as possible :)
Comment 5 caulier.gilles 2008-03-18 12:11:28 UTC
Colin,

No... It's too complicated. Image editor is not designed to work as well. And look my comment #1. You want to play with JPEG in editor => saving transformations using JPEG format is lossy. This is the same problem in Gimp or Photoshop.

Using lossless format as TIFF or PNG is the ultimate solution

Also, if you use JPEG to save an image from editor, there is a red text warning 
on the saveas dialog about this format.

For me, it's a workflow problem.

Gilles
Comment 6 caulier.gilles 2008-03-28 20:44:20 UTC
Arnd,

In editor, like we have a warning in save as dialog about quality lost when user use JPEG file format to store image transformation, there is nothing than we can do anymore in this file...

Gilles
Comment 7 Arnd Baecker 2008-03-28 21:02:18 UTC
Yes, with the new warning (which was introduced after 0.9)
in the image editor, I would say this is as explicit as possible.
Comment 8 Sergejs 2021-01-08 19:15:01 UTC
Hello,
Despite this report being marked as resolved, from a new user perspective it looks like digiKam 7.2 does not support lossless JPG rotation at all?

I have read through lots of documentation and could not find a definitive answer IF and when DigiKam 7.2 uses lossless Jpeg rotation. Furthermore when I rotate a JPG file, it all the time changes file size, so it probably is NOT lossless?

Also DigiKam is not on the list here: http://jpegclub.org/losslessapps.html 

so to clarify:
1 - is normal "Rotate Left/Right" lossless for JPG files?
2 - is "Auto Rotate/Flip Using Exif information" lossless?

I would like to use "Auto Rotate/Flip Using Exif information", but if DigiKam can not do it losslessly, then there should be a confirmation dialog to stop people from messing up their photos.


+ not a bug, but still:
I also noticed that after DigiKam writes metadata to JPEG files from Panasonic camera, the file becomes a few KB smaller. This is very strange as DigiKam presumable wrote more metadata to it than Windows Photo Gallery and yet the file becomes smaller... Scary stuff.
Comment 9 Maik Qualmann 2021-01-08 19:28:32 UTC
Please do not reopen such old closed bugs. We also have a mailing list to ask questions and receive answers. Yes, the rotation in the album view is lossless if the image has the correct side lengths (divisible by 8) e.g. A new image is always created in the image editor, this information can also be found in the setup for the rotation settings. Yes, the file size changes even with lossless rotation. Setting the Exif orientation is always lossless.

Maik
Comment 10 Sergejs 2021-01-08 20:37:20 UTC
Thank you for the reply. 

My true problem was that there is no search in the HTML version of digiKam documentation... and the sub-chapters about image rotations are not visible in the HTML index. So I failed to find this: https://docs.kde.org/trunk5/en/extragear-graphics/digikam/using-digikam.html#using-rotateimage

Having clearer tooltips or explicit "lossless rotation" written on the buttons would make it even better, but I must admit the information IS there in the documentation and even sort-of in the settings view.


As for the mailing list - I literally tried to write about this to the mailing list. I did. And it did not work despite me sitting with accounts both for the mailing list and on the mysterious nabble. My posts never came through - no idea why.