FS#15540 - [gtk2] huge problems viewing jpeg images with many programs.
Attached to Project:
Arch Linux
Opened by mikes (mechmg93) - Friday, 17 July 2009, 14:18 GMT
Last edited by Jan de Groot (JGC) - Wednesday, 14 October 2009, 06:58 GMT
Opened by mikes (mechmg93) - Friday, 17 July 2009, 14:18 GMT
Last edited by Jan de Groot (JGC) - Wednesday, 14 October 2009, 06:58 GMT
|
Details
Name : gqview
Version : 2.0.4-2 I have serious problems viewing jpeg images through gqview. Most of the images look either blurry or with completely wrong colors and sometimes look completely destroyed. It seems that there is another libjpeg7 issue because i have problems only with jpeg files. Sample: http://img43.imageshack.us/img43/2176/69665103.png |
This task depends upon
Closed by Jan de Groot (JGC)
Wednesday, 14 October 2009, 06:58 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in 2.18.2.
Wednesday, 14 October 2009, 06:58 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in 2.18.2.
This is already reported to upstream, but probably the problem is in gtk+2.
[#1] http://sourceforge.net/tracker/?func=detail&atid=1054680&aid=2819892&group_id=222125
I also attached a simple pygtk script that loads a jpeg image using gdk-pixbuf. It works fine for me. Is anybody able to make a C version of this? If we can get it down to a minimal example of the issue, it will be much easier to trace to cause.
The blurring only occurs when you use a GdkPixbufLoader.
pacman -R libjpeg
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: amsn-svn: requires libjpeg
:: compiz-fusion-plugins-main: requires libjpeg>=7
:: gegl: requires libjpeg>=7
:: imlib: requires libjpeg>=7
:: imlib2: requires libjpeg
:: jasper: requires libjpeg>=7
:: libdjvu: requires libjpeg>=7
:: libgphoto2: requires libjpeg>=7
:: libmng: requires libjpeg>=7
:: libtiff: requires libjpeg>=7
:: libwmf: requires libjpeg>=7
:: mjpegtools: requires libjpeg>=7
:: mplayer: requires libjpeg>=7
:: poppler: requires libjpeg>=7
:: sdl_image: requires libjpeg>=7
It will load an image at 100, 50 and 25 % and gives the following results for me:
Unpatched GTK: 100 blurry, 50 OK, 25 OK
GTK from repo: 100 OK, 50 blurry, 25 blurry (now that I look closely; a bit hard to see)
My patch: all OK.
You can also try inserting images scaled to 50 % in Zim. With gtk2 2.16.5-1 they are blurry, which is what led me to look into this.
libjpeg-7-proper.patch (0.7 KiB)
I strongly advise to correct the code by simply inserting the statement
cinfo->scale_num = 1;
in front of the following code sequence in mentioned function:
for (cinfo->scale_denom = 2; cinfo->scale_denom <= 8; cinfo->scale_denom *= 2) {
jpeg_calc_output_dimensions (cinfo);
...
This addition will work with older and newer versions of the library.