Viewnior - Elegant Image Viewer

display errors with width greater than 32768 pixels (15bit)

Reported by Philipp Gassmann on 2011-02-06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
F-Spot
Confirmed
Medium
Mozilla Firefox
New
Undecided
Unassigned
Shotwell
New
Unknown
Viewnior
Undecided
Unassigned
gThumb
New
Undecided
Unassigned

Bug Description

When I open an image with more than 32'768 pixel in width, the won't display the pixels > 32'768
This is the case when combining multiple XX Megapixels images to a Panorama.
Tried wide image in tif and jpg format.

32768 is 2^15, 16bit.

Affects multiple tools. Shotwell is a special case, where it affects only certain zoom levels.

Philipp Gassmann (phiphi.g) wrote :
description: updated
description: updated
Changed in shotwell:
status: Unknown → New
Changed in f-spot:
importance: Unknown → Medium
status: Unknown → Confirmed
Philipp Gassmann (phiphi.g) wrote :

Problem identified on upstream bug report:
https://bugzilla.gnome.org/show_bug.cgi?id=163090#c18

Cyril Roussillon wrote on 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...

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.