/**
* Encodes a Raster with a given ColorModel and writes the output
* to the OutputStream associated with this ImageEncoder.
*/
public void encode(Raster ras, ColorModel cm) throws IOException {
RenderedImage im = new SingleTileRenderedImage(ras, cm);
encode(im);
}