You are not logged in.

#26 2009-07-18 10:46:41

aktinos
Member
Registered: 2006-01-25
Posts: 3

Re: Gqview and GTK2 2.16.4-1

Thanks a lot!

Offline

#27 2009-07-18 11:23:28

Vain
Member
Registered: 2008-10-19
Posts: 159
Website

Re: Gqview and GTK2 2.16.4-1

Ha, good job. Thanks a lot! big_smile

Offline

#28 2009-07-18 12:55:06

kgas
Member
From: Qatar
Registered: 2008-11-08
Posts: 718

Re: Gqview and GTK2 2.16.4-1

djgera, good work. you can move to the next level, TU big_smile

Offline

#29 2009-07-18 13:28:37

kjon
Member
From: Temuco, Chile
Registered: 2008-04-16
Posts: 398

Re: Gqview and GTK2 2.16.4-1

Impressive. You're my master allan. I'm still a young padawan.


They say that if you play a Win cd backward you hear satanic messages. That's nothing! 'cause if you play it forwards, it installs windows.

Offline

#30 2009-07-18 15:21:38

hbekel
Member
Registered: 2008-10-04
Posts: 311

Re: Gqview and GTK2 2.16.4-1

Thanks djgera! I looked into this myself but gave up big_smile

Offline

#31 2009-07-20 19:07:37

linfan
Member
From: Stockholm, Sweden
Registered: 2004-04-23
Posts: 135

Re: Gqview and GTK2 2.16.4-1

This patch, where does it go? To gqview, gtk or gdk-pixbuf? I tried to patch gdk-pixbuf, but I could not get it to patch.

How would the patch be written in the PKGBUILD?

I tried:
patch -i -Np1 ${srcdir}/foo.patch

Offline

#32 2009-07-20 20:14:29

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,937
Website

Re: Gqview and GTK2 2.16.4-1

@linfan that patch is included in the last package of gtk.


Give what you have. To someone, it may be better than you dare to think.
Blog

Offline

#33 2009-07-20 20:22:38

JGC
Developer
Registered: 2003-12-03
Posts: 1,659

Re: Gqview and GTK2 2.16.4-1

This patch is added to gtk2 (and has been filed upstream also). It's included in gtk2 2.16.4-2 and gtk 2.16.5-1.

Offline

#34 2009-07-20 22:14:02

linfan
Member
From: Stockholm, Sweden
Registered: 2004-04-23
Posts: 135

Re: Gqview and GTK2 2.16.4-1

ok, I see :-) Then this patch has nothing to do with gqview and geeqie that cannot fit photos to wide screen. Then I will have to continue searching the forums and bug reports to figure out why jpegs aren't showed as full screen any more.

Offline

#35 2009-07-22 09:34:26

safran
Member
From: Vienna, Austria
Registered: 2008-01-12
Posts: 17
Website

Re: Gqview and GTK2 2.16.4-1

Impressive indeed. I barely encountered this problem and you already found, discussed, fixed, patched and uploaded it. One -Sy later everything runs fine. Thanks a lot guys!

Offline

#36 2009-07-23 04:22:12

droog
Member
Registered: 2004-11-18
Posts: 877

Re: Gqview and GTK2 2.16.4-1

Thanks, hope this gets fixed upstream.

safran wrote:

Impressive indeed. I barely encountered this problem and you already found, discussed, fixed, patched and uploaded it. One -Sy later everything runs fine. Thanks a lot guys!

well, nothing fixed here, in any update yet...

Last edited by droog (2009-07-23 04:36:06)

Offline

#37 2009-07-23 11:09:14

safran
Member
From: Vienna, Austria
Registered: 2008-01-12
Posts: 17
Website

Re: Gqview and GTK2 2.16.4-1

got gtk2 2.16.5-1 from extra?

Offline

#38 2009-07-24 01:40:07

putte_xvi
Member
From: Sweden
Registered: 2009-04-10
Posts: 21

Re: Gqview and GTK2 2.16.4-1

It's still broken in 2.16.5-1, but now the blur occurs with images scaled to 50 % rather than 100 %.

As noted by Vain things were fine when viewing images with a scaling factor above 100 % but blurry at 100 % and just below. The patch pushed things one step down, so images look OK at 100 % (as in test case posted earlier by electropura) and blurry at 50 %.

This is my patch, which I think is correct (and Works For Me (TM) at both 50 and 100 %):

--- gdk-pixbuf/io-jpeg.c.orig    2009-07-23 23:21:25.000000000 +0200
+++ gdk-pixbuf/io-jpeg.c    2009-07-24 02:05:07.000000000 +0200
@@ -922,13 +922,14 @@
                 }
             }
             
-            for (cinfo->scale_denom = 2; cinfo->scale_denom <= 8; cinfo->scale_denom *= 2) {
+            cinfo->scale_num = 8;
+            for (cinfo->scale_denom = 2; cinfo->scale_denom <= 16; cinfo->scale_denom += 1) {
                 jpeg_calc_output_dimensions (cinfo);
                 if (cinfo->output_width < width || cinfo->output_height < height) {
-                    cinfo->scale_denom /= 2;
                     break;
                 }
             }
+            cinfo->scale_denom -= 1;
             jpeg_calc_output_dimensions (cinfo);
             
             context->pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB,

What I think is happening is this:

1. From the documentation changes it appears that libjpeg 7 has completely changed the range of allowable scaling factors: it used to be 1.0--0.125, but now it's 8.0--0.5.

2. This triggers a bug in GTK which occurs at when the image is scaled to or slightly below
* 12,5 % with libjpeg 6,
* 100 % with libjpeg 7,
* 50 % with libjpeg 7 and djgera's patch.

GTK tries different scaling factors until it finds one that makes the image smaller than the requested size. With libjpeg 6, these are 1/2, 1/4 and 1/8. But libjpeg 7 apparently changes the numerator from 1 to 8 (and GTK never sets it explicitly) so it will try 8/2, 8/4 and 8/8 instead, i.e. 100 % is the smallest scaling factor it tries.

And this is where the bug comes in: If none of the attempted scaling factors result in an image smaller than the requested size, the actual scaling factor will decreased one step too far.

For example, if Gqview requests an image at 100 %, GTK will try to load it at 400, 200 and 100 %, and since it still isn't smaller than 100 %, it will be loaded at 50 %. With djgera's patch, it goes one step further and tries at 50 %, so it works. Until you request an image at 50 % and get 25 %. smile

Last edited by putte_xvi (2009-07-24 01:43:18)

Offline

#39 2009-07-24 02:16:56

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 686
Website

Re: Gqview and GTK2 2.16.4-1

Very good!, thanks wink

Please post to upstream: http://bugzilla.gnome.org/show_bug.cgi?id=588740
And request reopen the ticket here: http://bugs.archlinux.org/task/15540

Offline

#40 2009-07-24 21:37:37

droog
Member
Registered: 2004-11-18
Posts: 877

Re: Gqview and GTK2 2.16.4-1

safran wrote:

got gtk2 2.16.5-1 from extra?

No i was on 2.16.4-1, upgrading now and hope it works!

finished the update and it does, thanks!

gqview is a staple, It's the best image viewer and will always will be, the forks are gay.
I spent an hour or so grepping around and wasting time trying to figure this out and ofc didn't
but I have faith that me or someone else will always keep it updated, It's simply the best image viewer.

Offline

Board footer

Powered by FluxBB