For Slick to load png files without a warning, they cannot be interlaced. I don't have photoshop, and I don't want to get it. Is there an alternative way to de-interlace images, perhaps through Paint.net plugins? I'm on a Windows machine, only mentioning this because there is a multitude of de-interlacing programs that only work on Mac or Linux.
How to de-interlace png files?
Asked Answered
Just open it with practically any Image Editor/Viewer (eg: xnview) and save it as non-interlaced. –
Lied
@Lied as it turns out MS Paint saves PNG files as non-interlaced... So now if I want to make a new file I have to save it in MS Paint instead of Paint.net. do you know if there are any ways to save as non-interlaced in Paint.net? –
Rollo
Paint.net does not save PNG as interlaced. –
Lied
Strange, perhaps it's just this image or something... No, once I saved it in Paint.NET it gave problems again. It's also entirely possible that it isn't actually interlacing, it may be the bits but I'm saving images as 8 bit. –
Rollo
Are you sure it's interlaced? forums.getpaint.net/index.php?/topic/26064-non-interlaced-png Test with entropymine.com/jason/tweakpng –
Lied
It's 8 bit, non - interlaced... Let me see what it says if I do MS Paint's version. –
Rollo
On the Paint.NET one it says it's "8 bits/pixel, paletted", on MS Paint it says "8 bits/sample, truecolor + alpha" –
Rollo
Use ImageMagick - it's not fast, but is at least cross-platform.
magick convert -interlace none interlaced.png uninterlaced.png
Thanks, works great for me. I had an issue with interlaced PNG files in connection with asciidoctor pdf generation. Hint: For me the complete command was
magick convert -interlace none interlaced.png uninterlaced.png
. –
Renee I too needed to use asciidoctor-pdf and was facing the same issue. I installed 'ImageMagick-6.9.12-Q16-HDRI' (latest version) and found the new command to convert interlaced to uninterlaced png as below (we no longer need 'magick' at the start of the command): convert -interlace none interlaced.png uninterlaced.png –
Xl
Building upon pobrelkey's answer and mentalo's comment, you can use ImageMagic's mogrify
command to convert the image in-place:
(Warning: The following will overwrite some-image.png
.)
magick mogrify -interlace none some-image.png
This also allows to convert multiple image files at once:
magick mogrify -interlace none image1.png image2.png image3.png
magick mogrify -interlace none *.png
© 2022 - 2024 — McMap. All rights reserved.