All the way through ImageIO, into Images, into rasters... is pretty slow.
Yes. It matters when you start to load many images at once...
Loading TGAs is more than 10 times faster on my machine.
How do you load them? Do you use a TGA loader (which one?), or do you load the bytes directly and examine its (mini) header for bpp, height, with, etc? (I guess so.)
Loading TGAs through a GZipInputStream should be still faster than PNGs through ImageIO (and you get about the same compression - with my test images it was actually a bit better in each case).
Using GZiped TGAs could be a good idea; we would have to do some tests. Indeeds, it's even slighty smaller.
However why should they decompress faster compared to compressed PNGs? (Because Java's gunzip is faster than ImageIO's PNG decompressor?)
However, then I couldn't control the tons of images laying around on disc with a picture viewer anymore... which is nice when using PNG.
Jedit supports GZip txt files, but Xnview doesn't show GZIped TGAs. :-|
However, gzipping em isn't really necessary if you want to use webstart. You can gzip the whole thing there, it gets decompressed on the client side.
You mean the usual Webstart JARs, so the TGAs inside it would be decompressed on the fly at loading time?