After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 163090 - gdk-pixbuf scalers fall over when image dimensions > 32768
gdk-pixbuf scalers fall over when image dimensions > 32768
Status: RESOLVED OBSOLETE
Product: gdk-pixbuf
Classification: Platform
Component: pixops
git master
Other Linux
: Normal normal
: ---
Assigned To: gdk-pixbuf-maint
gdk-pixbuf-maint
: 303698 475621 592880 618843 622527 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-01-06 04:38 UTC by John Ellis
Modified: 2018-05-22 13:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
panorama bug 32768 pixel (41.37 KB, image/jpeg)
2011-02-06 22:15 UTC, Philipp Gassmann
Details

Description John Ellis 2005-01-06 04:38:06 UTC
Attempt to use gdk_pixbuf_composite on any pixbuf with one of the dimensions
greater than 32768. You either get image corruption or a crash.

Repeatable on GTK+ 2.2.4 and 2.6.0
Comment 1 Christian Persch 2006-01-10 12:19:19 UTC
Sorry, but why was this WONTFIXed without even any short comment explaining that? 
Comment 2 Matthias Clasen 2006-01-11 15:07:16 UTC
I think its not worth worrying about images of this size, really. 
But if you have a patch, feel free to attach it here.
Comment 3 Lucas Rocha 2006-08-12 02:30:28 UTC
*** Bug 303698 has been marked as a duplicate of this bug. ***
Comment 4 Felix Riemann 2007-09-14 23:30:48 UTC
*** Bug 475621 has been marked as a duplicate of this bug. ***
Comment 5 Felix Riemann 2009-08-24 12:10:03 UTC
*** Bug 592880 has been marked as a duplicate of this bug. ***
Comment 6 Felix Riemann 2010-05-19 18:33:27 UTC
*** Bug 618843 has been marked as a duplicate of this bug. ***
Comment 7 Felix Riemann 2010-07-05 20:15:15 UTC
*** Bug 622527 has been marked as a duplicate of this bug. ***
Comment 8 Iasen Kostov 2010-11-09 15:54:20 UTC
It's funny how people think only about their daily lives and don't think there
could be others with different task and uses for the things. E.g. the image
viewer that some use to look at their vacation photos others use the same
viewer to look at scientific data :)

Saying "its not worth worrying about images of this size, really" is pretty funny and narrow minded. And yes I need images over 32768 even over 100 000 and even more ;)
Comment 9 Luke Hutchison 2010-11-09 16:05:16 UTC
I agree with iasenkk's comment 8.  I frequently try to use GNOME's various image viewers to view scientific data, and they frequently are broken for this purpose.  e.g. I was trying to view an image that was something like 80,000 pixels wide by 1000 pixels high just the other day, and it was quite amusing to see the weird ways each of the different viewers would break on this image at different zoom settings.
Comment 10 Martin Olsson 2010-11-09 17:34:16 UTC
I also agree, I run into this problem all the time.
Comment 11 Iasen Kostov 2010-11-09 19:22:42 UTC
Btw why is this "UNCONFIRMED" when it's a long (years) known bug of Microsoft type ;)
Comment 12 Olav Vitters 2010-11-09 20:31:46 UTC
Iasen: Status of a bug does not reflect when it will be fixed.
Comment 13 Iasen Kostov 2010-11-09 20:45:44 UTC
I meant - why the status is not set to "CONFIRMED" when it's a know bug for 5+ years ? BTW gimp works fine with those large images, can't You use the scaling code from there ?
Comment 14 Olav Vitters 2010-11-09 21:32:05 UTC
Iasen: Not a question of just copy/pasting. Patch appreciated, but focus is not at all on this by the current developers.

Unconfirmed is just a helping hint for triagers. Nobody in GNOME Bugzilla cares about the status of a bug. Because Bugzilla sends an email when the status is changed, triagers often refrain from changing the status if that is the only thing which should be done. If you want to discuss the latter further, please email bugmaster@gnome.org and I'll explain.
Comment 15 Iasen Kostov 2010-11-10 01:42:26 UTC
(In reply to comment #14)
> Iasen: Not a question of just copy/pasting. Patch appreciated, but focus is not
> at all on this by the current developers.

I thought the focus is on usability ? If the users can't use it why develop it at all as users will switch to something else sooner or later ?
Comment 16 Philipp Gassmann 2011-02-06 22:15:41 UTC
Created attachment 180251 [details]
panorama bug 32768 pixel
Comment 17 Philipp Gassmann 2011-02-06 22:18:46 UTC
Bug appeared when trying to view a 360 degrees panorama image combined of 12 images from a DSLR with > 10 Megapixels. This is not a very special case.
And it affects multiple Imageviewers as it seems.

Bug Link: https://bugs.launchpad.net/gthumb/+bug/714275
Comment 18 Cyril Roussillon 2012-01-10 01:01:27 UTC
Very annoying for panoramas indeed.

I had a look, and the problem is in the scaling functions in gdk-pixbuf/pixops/pixops.c : the constant SCALE_SHIFT which is set to 16.

So for instance in function pixops_process when you execute:

  run_end_x = (((src_width - filter->x.n + 1) << SCALE_SHIFT) - scaled_x_offset);

with src_width > 32768 and run_end_x of type int, you get an overflow.

What I did as a temporary local workaround is to define SCALE_SHIFT to 12 instead of 16, but a cleaner fix would probably be to use gint64 variables instead of int wherever it is necessary (as it only affects local variables).

Hope this could motivate a developer to fix it properly...
Comment 19 GNOME Infrastructure Team 2018-05-22 13:02:43 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gdk-pixbuf/issues/5.