Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 306297 - media-gfx/feh doesn't rotate images with jpeg-8
Summary: media-gfx/feh doesn't rotate images with jpeg-8
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Graphics Project
URL: http://bbs.archlinux.org/viewtopic.ph...
Whiteboard:
Keywords:
Depends on:
Blocks: bundled-libs
  Show dependency tree
 
Reported: 2010-02-22 03:55 UTC by Denilson Sá Maia
Modified: 2010-03-01 17:00 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Denilson Sá Maia 2010-02-22 03:55:08 UTC
Recent media-libs/jpeg-8 update broke JPEG lossless transformations for at least two programs:

media-gfx/feh-1.3.4
media-gfx/gthumb-2.10.11

You can open any JPG image in feh, then right-click -> File -> Edit in Place -> Rotate 90 CW. This will close feh and print "Bogus virtual array access" at the terminal. The expected behavior is the JPG image being correctly rotated. Feh worked fine with jpeg-7 (or 6).

With gthumb, you can use the "rotate" button at the interface (the last one at the toolbar). With jpeg-8, a progress dialog is briefly shown, and nothing happens. With jpeg-7 (and probably earlier too), everything works as expected.

Maybe other programs are also affected, but right now I've noticed only these two.

Because of this, I'm masking jpeg-8 on my system (which is stable amd64, by the way).
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2010-02-22 07:38:13 UTC
I'm not convinced this is a problem with jpeg, but with feh and gthumb because following command is working fine:

jpegtran -rotate 90 input.jpg > output.jpg

Please open a new bug for gthumb (clone of this).

Also, http://bbs.archlinux.org/viewtopic.php?pid=707556
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2010-02-22 08:06:17 UTC
The problem here is that feh is shipping copies of jpegint.h, transupp.c and transupp.h in it's source directory (src/ in tarball) and then is linking 
against system jpeg. Those files are from jpeg-6b and are incompatible with jpeg-8.
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2010-02-22 08:43:05 UTC
I've mailed the new upstream about this (Daniel Friesel <derf AT chaosdorf.de>) and bumped feh to 1.3.5 (doesn't solve this issue)
Comment 4 Denilson Sá Maia 2010-02-22 12:12:11 UTC
(In reply to comment #1) 
> Please open a new bug for gthumb (clone of this).

Done: bug 306341
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2010-02-22 21:23:30 UTC
(In reply to comment #4)
> (In reply to comment #1) 
> > Please open a new bug for gthumb (clone of this).
> 
> Done: bug 306341
> 

Thanks. Got a update from upstream today,

<quote>

Yeah... I've already gone through quite a lot of debugging with this.
The problem is that feh uses options from libjpeg which the library
deliberately does not make available to external programs; the
corresponding source file (transupp.h) actually encourages software
authors to copy transupp.c into their source tree. This makes things
rather fragile of course, when compiled with libjpeg6b everything works
but it is incompatible with other versions.

There are two solutions to this, either use separate branches or defines
for libjpeg6 / libjpeg8 (which still doesn't fix the main problem) or
remove the rotation support completely and call the jpegtran binary for
that instead. Currently I'm favoring the latter one, but have not yet
had the time to think through that or implement it. I hope to have a
solution in the next release, though.

Thanks for the mail,
Daniel

</quote>
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2010-02-26 16:54:10 UTC
This is now fixed in upstream trunk, and will be in next release. It doesn't include internal jpeg files anymore, instead it's calling the jpegtran binary.

git clone git://github.com/derf/feh.git
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2010-03-01 17:00:04 UTC
+*feh-1.3.5_p20100301 (01 Mar 2010)
+
+  01 Mar 2010; Samuli Suominen <ssuominen@gentoo.org>
+  +feh-1.3.5_p20100301.ebuild:
+  Version bump (snapshot) wrt #306297, thanks to Denilson for reporting.
+  This will fix >= jpeg 8 image rotation.