Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 306679

Summary: media-gfx/digikam-1.2.0: Image rotation is broken
Product: Gentoo Linux Reporter: Kuhn Markus <k17031965>
Component: [OLD] KDEAssignee: Gentoo KDE team <kde>
Status: RESOLVED FIXED    
Severity: normal CC: binki, dilfridge, esigra, me, px79
Priority: High Keywords: InOverlay
Version: unspecifiedFlags: tampakrap: Bugday+
Hardware: AMD64   
OS: Linux   
URL: http://bugs.kde.org/show_bug.cgi?id=228483
Whiteboard: [kde testing]
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 321613    
Attachments: Untested patch porting to jpeg-8
ebuild which applies patch against kipi-plugins-1.2.0
patch which fixes libjpeg v8a issue

Description Kuhn Markus 2010-02-24 17:18:37 UTC
Rotate photos with Digikam-1.1.0

Gentoo 64bit
kde-base/kde-meta-4.3.3
media-gfx/digikam-1.1.0
kde-base/gwenview-4.3.3

Since the Digikam-1.1.0, I can´t rotate any photos, and more there comes a
error message.

Gwenview-4.3.3 while rotating photos, saves the change but not over
the program beyond the end off.

Reproducible: Always

Steps to Reproduce:
1. mark Foto
2. Strg + Umschalt + --> (for rotate right)
3. Enter

Actual Results:  
error message can not rotate this Foto.


The rights groups from the photos are with me as a user.
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2010-02-24 17:26:53 UTC
jpeg image? 

digikam-1.1.0/libs/jpegutils/ ships a internal copy of libjpeg-6b which would make it incompatible with system libjpeg-8, and break rotating.
Comment 2 Kuhn Markus 2010-02-24 17:52:03 UTC
(In reply to comment #1)
> jpeg image? 
> 
> digikam-1.1.0/libs/jpegutils/ ships a internal copy of libjpeg-6b which would
> make it incompatible with system libjpeg-8, and break rotating.
> 

Yes, can not rotate JPEG images, PNG images are rotated.
My English is very bad, and I do not understand your proposal.
What can I do to fix the error?
Comment 3 Andreas K. Hüttel archtester gentoo-dev 2010-02-24 23:05:54 UTC
(In reply to comment #1)
> jpeg image? 
> 
> digikam-1.1.0/libs/jpegutils/ ships a internal copy of libjpeg-6b which would
> make it incompatible with system libjpeg-8, and break rotating.
> 

It's worse than that. This is some snippet of stuff from the old libjpeg, heavily edited and extended for digikam, _and_ bundled with the old _internal_ headers. 

Patching it out may be a job for upstream. :(
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2010-02-25 16:07:02 UTC
Well, based on the information here, I've opened

http://bugs.kde.org/show_bug.cgi?id=228483

Either they confirm it or not. ;-)
Comment 5 Peter Albrecht 2010-02-26 20:39:43 UTC
Thanks a lot for this bug report (and the cause of it)! I almost despaired of it, since half of my photos seemed to be corrupt...

As a workaround, I downgraded from media-libs/jpeg-8 to media-libs/jpeg-7 and now lossless JPEG rotation works again.

How do you think about changing/adding the digikam-1.1.0.ebuild dependancy to "<media-libs/jpeg-8"? Just as workaround until the problem is fixed in digikam itself. In order to protect other gentoo users against this bug.
Comment 6 Andreas K. Hüttel archtester gentoo-dev 2010-02-28 22:41:27 UTC
Created attachment 221563 [details, diff]
Untested patch porting to jpeg-8

This is an untested patch (well it compiles and links) to get things running with jpeg-8. 

Basically, I did a Bad Thing and just replaced the files from jpeg-6b with those from jpeg-8...
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2010-03-07 23:12:19 UTC
+*digikam-1.1.0-r1 (07 Mar 2010)
+
+  07 Mar 2010; Samuli Suominen <ssuominen@gentoo.org>
+  +digikam-1.1.0-r1.ebuild:
+  Update internal jpeg files wrt http://bugs.kde.org/show_bug.cgi?id=228483.

Updated from here: 

http://websvn.kde.org/trunk/extragear/graphics/digikam/libs/jpegutils/libjpeg-80/

Since upstream bug was fixed; closing this one fixed. In case you have more issues, you need to provide way more information. ;-)
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2010-03-07 23:19:52 UTC
And also use kdelibs-4.4.1 (or above) because of this fix,

http://bugs.kde.org/show_bug.cgi?id=224229
Comment 9 Kuhn Markus 2010-03-10 17:57:16 UTC
(In reply to comment #7)

> Since upstream bug was fixed; closing this one fixed. In case you have more
> issues, you need to provide way more information. ;-)

I wrote in the package.keywords this:
> = media-gfx/digikam-1.1.0-r1
> = media-libs/jpeg-8a: 0
and compiled Digikam thereafter.

gentoo64 ~ $ eix media-libs/jpeg
[I] media-libs/jpeg
     Available versions:
        (62) 6b-r9
        (7) ~ 7-r1
        (0) 8 (~) 8a
     Installed versions: 8a (19:24:56 08.03.2010)
    
gentoo64 ~ $ eix media-gfx/digikam
[I] media-gfx/digikam
     Available versions: (4) 1.1.0 (~) 1.1.0-r1
     and mergte Digikam thereafter.

The error still exists Digikam-1.1.0-r1 can not rotate JPEG files and Gwenview-4.3.5 do not save changes with JPEG files.
I put a new one .kde4 directory, but that brought no improvement.

Comment 10 Andreas K. Hüttel archtester gentoo-dev 2010-03-10 20:36:51 UTC
> The error still exists Digikam-1.1.0-r1 can not rotate JPEG files and
> Gwenview-4.3.5 do not save changes with JPEG files.
> I put a new one .kde4 directory, but that brought no improvement.

Ho hum. I kind of feared that since the patch does not too much more than mine. When I've confirmed that I'll reopen the bug.

Comment 11 Samuli Suominen (RETIRED) gentoo-dev 2010-03-10 20:47:26 UTC
(In reply to comment #10)
> > The error still exists Digikam-1.1.0-r1 can not rotate JPEG files and
> > Gwenview-4.3.5 do not save changes with JPEG files.
> > I put a new one .kde4 directory, but that brought no improvement.
> 
> Ho hum. I kind of feared that since the patch does not too much more than mine.
> When I've confirmed that I'll reopen the bug.
> 

Some console output (stdout/err) when trying to rotate image would be nice. And possibly gdb output...

It'd be nice to know what is going wrong and where instead of just everyone saying "it doesn't work" :)
Comment 12 Andreas K. Hüttel archtester gentoo-dev 2010-03-17 21:05:32 UTC
Not fixed in -r1. The patch makes no change at all. 

The only stderr output when clicking on the "rotate arrows" is
digikam(15194)/KEXIV2 KExiv2Iface::KExiv2::getImageOrientation: Orientation => Exif.Image.Orientation =>  1
(independent of arrow direction or image).

Trying to find out more.
Comment 13 Andreas K. Hüttel archtester gentoo-dev 2010-03-17 22:11:15 UTC
Also not fixed in media-gfx/digikam-9999.
Requested upstream to re-open bug.
Comment 14 Martin Gysel (bearsh) 2010-05-18 11:01:47 UTC
(In reply to comment #13)
> Also not fixed in media-gfx/digikam-9999.
> Requested upstream to re-open bug.
 
I think digikam is not the problem (AFAIK should be fixed there) but kipi-plugins as digikam use them to rotate pics (except when import pics)

As stated in http://bugs.kde.org/show_bug.cgi?id=228483 the issue has been fixed in svn of kipi-plugins in rev 1115335 (http://websvn.kde.org/?view=revision&revision=1115335)

I created a patch which applies against kipi-plugins-1.2.0 and it seems it fixes the problem
Comment 15 Martin Gysel (bearsh) 2010-05-18 11:03:27 UTC
Created attachment 231937 [details]
ebuild which applies patch against kipi-plugins-1.2.0
Comment 16 Martin Gysel (bearsh) 2010-05-18 11:07:08 UTC
Created attachment 231941 [details, diff]
patch which fixes libjpeg v8a issue
Comment 17 Andreas K. Hüttel archtester gentoo-dev 2010-05-31 23:34:48 UTC
(In reply to comment #16)
> Created an attachment (id=231941) [details]
> patch which fixes libjpeg v8a issue
> 

Thank you, fixed in overlay (digikam-1.2.0).
Comment 18 Andreas K. Hüttel archtester gentoo-dev 2010-07-09 20:37:22 UTC
Since digikam-1.2.0 is only in the overlay, I consider this issue resolved...
Bug 311935 is the version bump request.
Comment 19 Samuli Suominen (RETIRED) gentoo-dev 2010-07-09 20:39:41 UTC
(In reply to comment #18)
> Since digikam-1.2.0 is only in the overlay, I consider this issue resolved...
> Bug 311935 is the version bump request.
> 

The bug is also in the version that's in tree... how about reading the comments in this bug?

The issue is not resolved before it's in Portage.
Comment 20 Maciej Mrozowski gentoo-dev 2010-07-09 23:35:59 UTC
digikam-1.2.0-r2 in portage. Thanks to all involved!