SV: SV: Announcing SDL_image 1.0.5

(I’ve had to make several attempts to post this. I sincerely hope only one
of them succeeded. :slight_smile:

Sam Lantinga (slouken at devolution.com) wrote:

Can you send me the value of surface->w, surface->pitch, and
png_get_rowbytes(png_ptr, info_ptr)?

Sure. Assuming I didn’t make some stupid mistake, in this particular case I
got

surface->w = 225
surface->pitch = 676
png_get_rowbytes(png_ptr, info_ptr) = 675

I tried converting the image to another format and back to PNG again, but
although I got different values the error remained.

Poking around my hard disk I found a number of other PNGs with similar
problems. In the source tarball for Sawmill 0.26 (which you can get at
http://sawmill.sourceforge.net, at least until the upcoming change of name),
for instance, all the PNGs for the “gradient”, “gtk” and “simple” themes
have

surface->w = 15
surface->pitch = 48
png_get_rowbytes(png_ptr, info_ptr) = 45

and in the “microGUI” theme t_close_active.png, t_close_clicked.png and
t_close_normal.png have

surface->w = 18
surface->pitch = 56
png_get_rowbytes(png_ptr, info_ptr) = 54

In all the problem cases I saw surface->pitch and png_get_rowbytes( … )
were close to, but not quite, equal.

Torbj?rn Andersson