16-bit PNGs in Slick2D
Posted
by
Neglected
on Game Development
See other posts from Game Development
or by Neglected
Published on 2012-12-02T15:27:34Z
Indexed on
2012/12/02
17:22 UTC
Read the original article
Hit count: 202
I'm working on a project and I'm using some 3rd party sprites just to get it off the ground; recently I've come into a hitch. Slick2D doesn't seem to want to load my images. That is, it will warn me that images are the wrong bit-depth. All the images are in 16-bit PNG form (PNG is required for transparency). Is there any way I can disable the warning (being the bad guy programmer (the console print for each individual load REALLY SLOWS DOWN the image)) or is there another solution?
I was thinking about converting all images (using imagemagick) to .gif (with an alpha channel). Would there be any loss in quality between formats?
EDIT: I tried using imagemagick but some of the sprites use pure black so I can't do that without wrecking the image.
EDIT2: using "identify" on any of the images show them as being 8-bit.. but Slick2D won't load them. What the hell? D:
EDIT3: Issue solved (ish). If you are googling this then just disable the java png loader from slick by sticking this somewhere in your code (like the main method):
System.setProperty("org.newdawn.slick.pngloader", "false");
© Game Development or respective owner