public void encode(Raster ras, ColorModel cm) throws IOException {
        RenderedImage im = new SingleTileRenderedImage(ras, cm);
        encode(im);
    }
Encodes a Raster with a given ColorModel and writes the output
to the OutputStream associated with this ImageEncoder.
plugins/svg-plugin/batik-codec-fix/src/main/java/org/apache/batik/ext/awt/image/codec/util/ImageEncoderImpl.java