GNOME Bugzilla – Bug 612809
gthumb is unable to rotate attached jpeg image
Last modified: 2010-07-16 15:00:57 UTC
When pressing "[" or "]" to rotate 90 degrees, gthumb fails and reports: "Could not perform the operation Error interpreting JPEG image Bogus virtual array access" On the other hand, eog work fine with it I have: jpeg-8 gthumb-2.11.2.1 Downstream bug report: http://bugs.gentoo.org/show_bug.cgi?id=309251
I can rotate it without problems with the current master branch version
Is a bump scheduled soon?
(In reply to comment #2) > Is a bump scheduled soon? no
It even fails for me with trunk version :-(, maybe it's due our jpeg lib?
"Bogus virtual array access" is what you see when using transupp.{c,h} from jpeg-6b in combination with system jpeg-8 or jpeg-8a. Here you can see the exactly same problem in KDE's gwenview: http://bugs.kde.org/show_bug.cgi?id=227313 Solution 1: Make jpeg upstream include transupp.* in their API, so you don't need to bundle them anymore. This is unlikely to happen. Solution 2: Switch from using bundled source files to calling `jpegtran` binary for lossless rotation. Solution 3: Update the bundled files from jpeg-8a source tree, this will break backwards compability with jpeg-6b.
(In reply to comment #5) I think the better solution is to bundle both versions and conditionally compile the one compatible with the installed jpeg library.
Pacho, Can you test with the current git version? It should be fixed now. - Mike
It sadly fails to build for me :-( /bin/sh ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -pthread -DORBIT2=1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gconf/2 -I/usr/include/orbit-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/unique-1.0 -I../.. -I../../gthumb -ggdb -Wall -Wcast-align -Wtype-limits -Wclobbered -Wempty-body -Wignored-qualifiers -MT libjpeg_utils_la-transupp-80.lo -MD -MP -MF .deps/libjpeg_utils_la-transupp-80.Tpo -c -o libjpeg_utils_la-transupp-80.lo `test -f 'transupp-80.c' || echo './'`transupp-80.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -pthread -DORBIT2=1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gconf/2 -I/usr/include/orbit-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/unique-1.0 -I../.. -I../../gthumb -ggdb -Wall -Wcast-align -Wtype-limits -Wclobbered -Wempty-body -Wignored-qualifiers -MT libjpeg_utils_la-transupp-80.lo -MD -MP -MF .deps/libjpeg_utils_la-transupp-80.Tpo -c transupp-80.c -fPIC -DPIC -o .libs/libjpeg_utils_la-transupp-80.o In file included from transupp-80.c:47: /usr/include/jpeglib.h:1148:55: error: jpegint.h: No such file or directory transupp-80.c: In function 'do_crop': transupp-80.c:133: warning: implicit declaration of function 'jcopy_block_row' transupp-80.c: In function 'jtransform_request_workspace': transupp-80.c:1093: warning: implicit declaration of function 'jdiv_round_up' make[2]: *** [libjpeg_utils_la-transupp-80.lo] Error 1 make[2]: Leaving directory `/home/pacho/gthumb/extensions/jpeg_utils' make[1]: *** [install-recursive] Error 1 make[1]: Leaving directory `/home/pacho/gthumb/extensions' make: *** [install-recursive] Error 1 Thanks for your work :-)
> /usr/include/jpeglib.h:1148:55: error: jpegint.h: No such file or directory for some reason you don't have jpegint.h installed, your distribution should include it in the libjpeg-devel package.
But, it's present (!?): $ ls -l /usr/include/jpeglib.h -rw-r--r-- 1 root root 48475 mar 19 14:07 /usr/include/jpeglib.h :-/
jpegint.h, not jpeglib.h
No, jpegint.h is jpeg's internal file and shouldn't be installed into system in a -devel package or not. Correct, to fetch also error codes: #include <jpeglib.h> #include <jerror.h> Incorrect, because it will pull in also jpegint.h: #define JPEG_INTERNALS #include <jpeglib.h>
(In reply to comment #12) > No, jpegint.h is jpeg's internal file and shouldn't be installed into system in > a -devel package or not. JFYI, while porting your fix over to eog I also included jpegint.h into our tree. digiKam apparently had no problem shipping it even for the old libjpeg-6b.
I've included a copy of jpegint.h in gthumb now, thanks for the hint.
The error is now different with 2.11.3: Error interpreting JPEG image JPEG datastream contains no image
(In reply to comment #15) > The error is now different with 2.11.3: > > Error interpreting JPEG image > JPEG datastream contains no image Same here with gthumb-2.11.3 and jpeg-8a.
Same here with 2.11.3. The jpeg's are from a Canon Eos 400D and gthumb worked fine until 2.10.11. Saving the same image in jpeg-format from within gthumb works, but even those jpegs do not get rotated by gthumb. Rotating images in other programs like geeqie works fine.
can someone please test the current master branch version?
using jpeg-8a, I still get a dialog which says: Could not perform the operation Error interpreting JPEG image JPEG datastream contains no image
Still the same with 2.11.5
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.