missionpinball / mpf-mc

The Mission Pinball Framework Media Controller. Controls graphics, sounds, DMDs, and LCD displays in MPF.
http://missionpinball.org
MIT License
21 stars 42 forks source link

image displayed incorrectly #17

Closed MarkInc666 closed 7 years ago

MarkInc666 commented 8 years ago

title.png is garbled when displayed in a attract show title

in attract_dmd_loop.yaml

slides: attract_dmd_loop_slide_6: widgets:

garbled_image

MarkInc666 commented 8 years ago

any progress with this bug? Still showing as distorted.

MarkInc666 commented 8 years ago

I tried opening and saving the file in photoshop, using interlaced option and it now displays correctly. But shows this warning:

libpng warning: iCCP: known incorrect sRGB profile libpng warning: Interlace handling should be turned on when using png_read_image

Issue still open on non-interlaced png saved in mspaint.

toomanybrians commented 8 years ago

I've just spent the last 30 minutes reading about interlaced images and Python image libraries. Good find!

Looks like that support for interlaced PNGs is pretty hit-or-miss depending on the graphics library that's used. Looks like lib_SDL2 (the default we use) doesn't support interlaced PNGs. I researched that a bit and it seems like that's not a common thing and that only old versions of MS Paint produces them. :)

So we might be able to call this issue solved with a warning not to use old versions of MS Paint. Alternatively there are command line tools (even Python ones) to de-interlace images, or people can do as you did and save the image from another program.)

Either way though I think we can close this issue now that we (well, "you") got to the bottom of it.

MarkInc666 commented 8 years ago

Ok, thanks.

But weird stuff: This was mspaint that came with Windows 10. So, not just old version. In PS, I saved it as interlaced and it displayed (but with the interlaced warnings on load)

toomanybrians commented 8 years ago

That is weird. The libpng warning has lots of Google results too, but they seem to all be about a bug in libpng. (Though maybe in this case the warning is ok since the image was interlaced?)

I'll keep this issue open pending further investigation, but remove it as a blocker for 0.30 and clarify in the docs.

toomanybrians commented 7 years ago

closing because we haven't seen this problem since