PNG's In Mac on Java cause massive CPU usage
- by alexganose
Hey, I've been having this problem for a while now and I was hoping someone could help.
I make small games using Java on Mac OSX 1.6.3 and if I use PNG's as the image format my CPU usage by Java skyrockets to say 50% (on a very small 2D game). However if I use GIF as the format my CPU usage by Java stays constant at 10% which is reasonable.
What is causing this problem?? It occurs on every game I develop using PNG's so I always just switch to GIF's.
The problem is now that i need to use a PNG for its variable alpha properties rather than just plain transparency. This is not available using GIF's.
The problem is present on Java SE 6 and previous versions. I am using an early 2009 Mac Book Pro 15".
The problem does not occur on a Windows PC running the same game. The CPU usage due to Java using PNG's on a Windows PC (I have tried XP, Vista and 7) is always constantly low at ~10%.
Any help would be greatly appreciated.
Thanks :)