Slick Forums

Discuss the Slick 2D Library
It is currently Mon May 20, 2013 4:20 pm

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Wed Apr 06, 2011 2:24 pm 
Offline
Game Developer
User avatar

Joined: Thu Mar 03, 2011 6:22 pm
Posts: 534
In SVN, there seems to be an error with pictures where we set a transparent color.

Small example:
Code:
SpriteSheet entities    = new SpriteSheet("res/parts.png", 50, 50, Color.red);


gives me this in the current normal build:
Image

on an SVN build a get this:

Image

here is the picture I use:
Image

There is no change in code or movement, just changing the slick.jar.

Edit:
with alpha everything works normal.

_________________
Current Projects:
Image Mr. Hat I
Image Vegan Vs. Zombies
Projects:
RadicalFish Engine - Build on top of Slick2D, Ideas, Bugs? Open an Issue ticket!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 10, 2011 4:30 pm 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
Should be reverted in SVN, could you confirm.

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 10, 2011 6:21 pm 
Offline
Game Developer
User avatar

Joined: Thu Mar 03, 2011 6:22 pm
Posts: 534
Sure will do that tomorrow.

_________________
Current Projects:
Image Mr. Hat I
Image Vegan Vs. Zombies
Projects:
RadicalFish Engine - Build on top of Slick2D, Ideas, Bugs? Open an Issue ticket!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 11, 2011 10:32 am 
Offline
Game Developer
User avatar

Joined: Thu Mar 03, 2011 6:22 pm
Posts: 534
Works now. But gives a new error (or warn), for images with indexed colors:
Quote:
Mon Apr 11 12:23:57 CEST 2011 WARN:class org.newdawn.slick.opengl.PNGImageData failed to read the data
java.io.IOException: Transparent color not support in custom PNG Decoder
at org.newdawn.slick.opengl.PNGImageData.loadImage(PNGImageData.java:78 )
at org.newdawn.slick.opengl.CompositeImageData.loadImage(CompositeImageData.java:62)
at org.newdawn.slick.opengl.CompositeImageData.loadImage(CompositeImageData.java:43)
at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:292)
at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:254)
at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:187)
at org.newdawn.slick.Image.<init>(Image.java:192)
at org.newdawn.slick.SpriteSheet.<init>(SpriteSheet.java:144)
at org.newdawn.slick.SpriteSheet.<init>(SpriteSheet.java:130)
at spaceinvaders.GameplayState.init(GameplayState.java:47)
at org.newdawn.slick.state.StateBasedGame.init(StateBasedGame.java:171)
at spaceinvaders.ExtendedAppContainer.setup(ExtendedAppContainer.java:77)
at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:317)
at spaceinvaders.SpaceInvaders.main(SpaceInvaders.java:60)



Looking at the PNGImageData.class it looks like there is a lot missing or there was a big change.

_________________
Current Projects:
Image Mr. Hat I
Image Vegan Vs. Zombies
Projects:
RadicalFish Engine - Build on top of Slick2D, Ideas, Bugs? Open an Issue ticket!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 11, 2011 7:43 pm 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
Na, thats expected for the current work around. I'll sort it out when I do a proper run.

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 12, 2011 8:20 am 
Offline
Game Developer
User avatar

Joined: Thu Mar 03, 2011 6:22 pm
Posts: 534
Okay :)
Then thx a lot, now I can use the SVN Build /o/

_________________
Current Projects:
Image Mr. Hat I
Image Vegan Vs. Zombies
Projects:
RadicalFish Engine - Build on top of Slick2D, Ideas, Bugs? Open an Issue ticket!


Top
 Profile  
 
 Post subject: Re:
PostPosted: Fri May 11, 2012 11:07 pm 
Offline

Joined: Fri May 04, 2012 3:24 pm
Posts: 3
kevglass wrote:
Na, thats expected for the current work around. I'll sort it out when I do a proper run.

Kev

When is this going to be resolved? Its very annoying that IOExceptions fills the log. Using the nightly. Is there a way to get newer versions?


Top
 Profile  
 
 Post subject: Re: Re:
PostPosted: Fri May 11, 2012 11:31 pm 
Offline
Slick Zombie

Joined: Sat Jan 27, 2007 7:10 pm
Posts: 1467
simphax wrote:
kevglass wrote:
Na, thats expected for the current work around. I'll sort it out when I do a proper run.

Kev

When is this going to be resolved? Its very annoying that IOExceptions fills the log. Using the nightly. Is there a way to get newer versions?

I would suggest you try using the development branch, but loading images with a transparent pixel is currently bugged. I'll try to fix that up after the weekend. I'll also suppress the IOExceptions if they are indeed not a problem.


Top
 Profile  
 
PostPosted: Sat May 12, 2012 5:45 pm 
Offline
Slick Zombie

Joined: Sat Jan 27, 2007 7:10 pm
Posts: 1467
Little update. Dev branch transparent pixels should work with PNG images. Other formats will still be bugged (looking into that now).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group