Interface BitmapEncoder

All Known Implementing Classes:
ImageIOBitmapEncoder

public interface BitmapEncoder
This interface is used to encode bitmaps into their target formats.
Version:
$Id: BitmapEncoder.java,v 1.2 2004-09-04 20:25:54 jmaerki Exp $
Author:
Jeremias Maerki
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    encode(BufferedImage image, OutputStream out, String mime, int resolution)
    Encodes a BufferedImage to a target format and writes it to the OutputStream.
    Returns an array of MIME types supported.
  • Method Details

    • getSupportedMIMETypes

      String[] getSupportedMIMETypes()
      Returns an array of MIME types supported.
      Returns:
      the array of MIME types
    • encode

      void encode(BufferedImage image, OutputStream out, String mime, int resolution) throws IOException
      Encodes a BufferedImage to a target format and writes it to the OutputStream.
      Parameters:
      image - the image to encode
      out - the OutputStream to write the image to
      mime - the MIME type in which to encode the image
      resolution - the resolution in dpi of the image
      Throws:
      IOException - in case of an I/O problem