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 568835 - Incorrect display of PNG images
Incorrect display of PNG images
Status: RESOLVED DUPLICATE of bug 658610
Product: GIMP
Classification: Other
Component: General
2.6.3
Other Linux
: Normal normal
: ---
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2009-01-23 13:33 UTC by Graham P Davis
Modified: 2012-01-09 18:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch against 2.6.6 (1.02 KB, patch)
2009-07-21 11:41 UTC, Massimo
rejected Details | Review

Description Graham P Davis 2009-01-23 13:33:37 UTC
I've downloaded PNG images from http://iup.physik.uni-bremen.de:8084/amsr/arctic_AMSRE_visual.png. I was needing to process them with Gimp but found they wouldn't display correctly - being shifted down and to the right so that some of the image is lost. 

I've also tried displaying the images in Gwenview, Krita, ShowFoto, Firefox and Konqueror. None of these display the images incorrectly.

I realize that there could be a fault in the images but it still seems odd that only Gimp has trouble with them.

Cheers,

Graham
Comment 1 Christoph Wurm 2009-01-23 16:28:34 UTC
I have no problem with this png. Which part is missing on your system?
Comment 2 Graham P Davis 2009-01-23 17:19:59 UTC
I get a checkered strip down the LHS. The RHS is trimmed by a similar amount near the edge of the map so that the latitude labels are lost.This particular image is less affected than others. Some I have are also moved downwards and the rightward shift is greater so that some of the map is lost. 

The images were downloaded by right-clicking on the image and selecting "save image as . . ." I have been downloading these images for almost four years using Firefox - various versions, obviously. This problem viewing them with Gimp has been around for about as long but I'm afraid this is the first time I've stirred my bones to do anything about it.

I've just tried downloading the file using Konqueror and get the same effect when viewing it with Gimp.
 
Comment 3 Christoph Wurm 2009-01-23 18:25:20 UTC
You're right, just noticed the effect. I probably was a bit shallow the first time.
Comment 4 Michael Schumacher 2009-01-23 19:43:48 UTC
The image is moved by the offset specified in the PNG file. Many other programs do not support this.
Comment 5 Massimo 2009-07-21 11:41:52 UTC
Created attachment 138901 [details] [review]
Patch against 2.6.6

The attached patch resize the (gimp) image when the 
PNG specifies offsets.

When the offsets are negative and part of the content
become hidden the user has to activate 
'Fit Canvas to Layers' from the menu 'Image' to make 
them visible.
Comment 6 Martin Nordholts 2009-07-21 11:45:57 UTC
Massimo, if you start using git, we will consider giving you git push access so you can push your fixes without going through us.
Comment 7 Martin Nordholts 2009-07-21 15:33:30 UTC
According to this page:
http://www.libpng.org/pub/png/book/chapter11.html#png.ch11.div.10

The oFFS chunk is supposed to be used when a png is part of a bigger whole, for example as part of another image. In other words, what we currently do, offset the layer of the loaded png, does not make sense because the png is then not loaded as part of a bigger whole. IMO we should stop doing that.

We could consider doing it when the png is opened as a layer perhaps, because then it is more safe to assume it is opened as part of a bigger whole.

Since the offset can be very large, we can't create an image the same size of the offset, so I'm going to reject this patch.

Comment 8 Michael Natterer 2012-01-09 00:41:45 UTC
Massimo, Martin, isn't this simply a duplicate of bug 658610 ?
Comment 9 Martin Nordholts 2012-01-09 18:39:21 UTC
Indeed

*** This bug has been marked as a duplicate of bug 658610 ***