GNOME Bugzilla – Bug 568835
Incorrect display of PNG images
Last modified: 2012-01-09 18:39:21 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
I have no problem with this png. Which part is missing on your system?
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.
You're right, just noticed the effect. I probably was a bit shallow the first time.
The image is moved by the offset specified in the PNG file. Many other programs do not support this.
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.
Massimo, if you start using git, we will consider giving you git push access so you can push your fixes without going through us.
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.
Massimo, Martin, isn't this simply a duplicate of bug 658610 ?
Indeed *** This bug has been marked as a duplicate of bug 658610 ***