Class PngMapImageEncoder

java.lang.Object
com.kheops.util.encoders.AbstractMapImageEncoder
com.kheops.util.encoders.PngMapImageEncoder
All Implemented Interfaces:
MapImageEncoder

public class PngMapImageEncoder extends AbstractMapImageEncoder
  • Constructor Details

    • PngMapImageEncoder

      public PngMapImageEncoder()
  • Method Details

    • encode

      public void encode(BufferedImage im, OutputStream os, String format, String params) throws Exception
      Description copied from interface: MapImageEncoder
      Encodes a BufferedImage to an OutputStream using the specified image format and parameters.
      Parameters:
      im - the BufferedImage to encode.
      os - the OutputStream to encode to.
      format - the image format to encode with.
      params - the parameter to use when encoding.
      Throws:
      Exception - if an exception occurs.
    • getColorType

      public int getColorType(String format, String params)
      Returns the color type to use for the specified image format and parameters.
      Parameters:
      format - an image format. (ex. "jpeg", "gif", etc.)
      params - image format parameters.
      Returns:
      the color type to use for the specified image format and parameters.
    • getSupportedFormat

      public String[] getSupportedFormat()
      Returns an array of String that contains all supported image formats that are supported by this MapImageEncoder.
      Returns:
      an array of String that contains all supported image formats that are supported by this MapImageEncoder.