Offset error in PNG files, Can't delete PNG
On the www.libpng.org site, there is a FAQ page, http://www.libpng.org/pub/png/pngfaq.html#cantdelete about problem deleting a PNG in windows.
I come about this while makeing a png-file for my webbsite using convert and the composite option (joining a small image with a larger), and having problem reading the file on MS IE (XP SP2/IE6), including not being able to cleaning the cache.
If I open the image in Gimp2 I get an error on a invlid layer offset. But alla other program I usally used don't complain, and I can view the file without any problem.
I the found a link to a similar problem on a Imagemagick mail list
http://studio.imagemagick.org/pipermail/magick-bugs/2003-August/001451.html, that made me find this.
I think this are related.
I have myselt verifyed that the file load correct if I take the file with the wrong offset, and do as as proposed in the mail (convert in.png -page +0+0 out.png) makes the file correct again.
Examples
Image with offset error
Image without offset error
Commands using ImageMagic that produce the bogus PNG
# Crop picture to interesting area, and convert to png
convert -crop 120x120+740+40 D2.JPG D2.png
# Get date of source image
convert -crop 99x8+92+5 D2.JPG D2.date.png
# Make a composite image of latest croped image and date
composite D2.date.png D2.png D2.t.png
D2.JPG (big)
D2.date.png:
D2.t.png: