PNGs: Half decoded

Bugs, defects, GPFs found in XnView Classic.

Moderators: Olivier_G, Dreamer, XnTriq, helmut, xnview

PNGs: Half decoded

Postby CheloXL » Wed Aug 22, 2012 6:33 pm

Hi,
It seems that there are some PNGs that are stored in several chunks (or that's what I believe), because XnView only displays half of them (and by half I mean half of the image). Depending on the image size (width, height), XnView can display the complete image, the top vertical half, the top vertical third, etc.

Examples:
http://www.extremefx.com.ar/temp/x2.png
http://www.extremefx.com.ar/temp/x4.png

Both are exactly the same image, one is twice the size of the other. On the first one (x2) you can see only half of it. On the second one, you can see only 1/4 of it.

Thanks in advance and regards,
CheloXL
 
Posts: 6
Joined: Wed Jun 03, 2009 6:37 pm

Re: PNGs: Half decoded

Postby eL_PuSHeR » Thu Aug 23, 2012 7:10 am

Firefox 14.0.1 cannot display them either. Are you sure they are valid?

Are they coming from a mobile device? They don't seem official PNGs.

Irfanview cannot open them. PSP X3 can't either.

PNGOut complains about not being standard/unsupported.
eL_PuSHeR
 
Posts: 259
Joined: Sat Apr 25, 2009 9:23 am

Re: PNGs: Half decoded

Postby CheloXL » Thu Aug 23, 2012 11:36 am

They are valid and yes, they come from a mobile device (iPad). Usually on PNGs, the image is stored in one data chunk (IDAT). But it is possible (and valid, based on the PNG specifications) that the image be stored in several data chunks, to generate a PNG in a streaming manner. This is done in that way on mobiles to optimize the upload of the image to the GPU (because you have to upload the image in chunks, and in that way you already have the chunks ready and do not have to do the splitting on the run).
CheloXL
 
Posts: 6
Joined: Wed Jun 03, 2009 6:37 pm

Re: PNGs: Half decoded

Postby Drahken » Thu Aug 23, 2012 8:49 pm

There is a history of apple using atypical PNG features, especially in their mobile devices. There's another thread or two floating around here about PNGs created by iphones which non-apple software can't handle properly. I do believe that apple is doing this kind of stuff intentionally, to try to force people to use apple products & software.
Oh the feuhrer, oh the feuhrer, oh the feuhrer's nipples bonk!
User avatar
Drahken
 
Posts: 872
Joined: Sun Apr 10, 2005 4:29 pm

Re: PNGs: Half decoded

Postby CheloXL » Thu Aug 23, 2012 9:11 pm

Yes, I know. Apple's PNG have a non-standard chunk type (CgBI - that XNView ignores, so that's ok), and some PNGs have byteswapped (RGBA -> BGRA) pixel data (and that's something I can fix in any photo editor), premultiplied alpha, etc. But the image stored in several IDAT chunks is totally valid on PNG files. That no one ever used, that's correct...
CheloXL
 
Posts: 6
Joined: Wed Jun 03, 2009 6:37 pm


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 3 guests