float quality, boolean encodeAlpha)
throws IOException {
ImageEncoder encoder = ImageEncoders.newInstance(getFormat(name));
encoder.setQuality(quality);
encoder.setEncodingAlpha(encodeAlpha);
return new AImage(name, encoder.encode(image));
}
/** Encodes an AWT image into a ZK image.
*
* @param name The name of the image. The extension of the name must
* be the format. For example, foo.png and foo.jpeg.