I've now made jAlbum write transparent PNGs as well as JPEG images.
I'm assuming this applies to thumbnails and scaled images. But what about images that the skin is processing outside of the album images? I've got a routine for scaling a title bar logo that looks something like this:
if(!logoBounds.equals("original")) {
bounds = logoBounds.split("x");
AlbumImage ai = new AlbumImage(new File(logoPath), engine);
ai = ai.scaleToFit(new Dimension(Integer.parseInt(bounds[0]), Integer.parseInt(bounds[1])));
logoImageWidth = ai.getImage().getWidth();
isScaledLogo = true;
scaledLogo = removeExtension(logoImage) + ".jpg";
ai.saveJPEG(new File(rootOutputDirectory + "/" + scaledLogo), 90);
}
If the provided logo image is a PNG, I'd much prefer to let jAlbum scale it, but keep it as a transparent PNG. How would I do that? Does scaleToFit() now return a PNG? And if it does, I'm guessing I should be using something other than saveJPEG() to write it out?