• Key Features
  • Superfast and superlight
  • Supports JDK 1.2 - 1.6
  • Very small footprint
  • Encodes true-color images
  • Encodes indexed images
  • Encodes gray-scale images
  • Encodes transparent images

PngEncoder Change Log

Version 2.0.1 to 2.0.2
  • Fixed a bug where the images were not encoded properly in COLOR_TRUECOLOR, COLOR_TRUECOLOR_ALPHA and COLOR_GRAYSCALE_ALPHA when the source image were read using ImageIO.read()
  • Now when encoding to an indexed color image the proper algorithm is chosen depending on the color count of the original image:
    • setIndexedColorMode(PngEncoder.INDEXED_COLORS_ORIGINAL) - use pixels from original image, should be used when there is less then 256 colors in the original image
    • setIndexedColorMode(PngEncoder.INDEXED_COLORS_CONVERT) - convert pixels to make sure all pixels are written to the target image
    • setIndexedColorMode(PngEncoder.INDEXED_COLORS_AUTO) - let the PngEncoder find the best mode automatically. May take longer time to encode
Version 2.0 to 2.0.1
  • Fixed a bug where some colors where written as white when converting from TRUECOLOR to INDEXED
Version 1.1 to 2.0
  • Added possibility to encode images with alpha transparency:
    PngEncoder encoder = new PngEncoder(PngEncoder.COLOR_TRUECOLOR_ALPHA);
    PngEncoder encoder = new PngEncoder(PngEncoder.COLOR_GRAYSCALE_ALPHA);
    PngEncoder encoder = new PngEncoder(PngEncoder.COLOR_INDEXED_ALPHA);
  • Increased the speed of the encoding even more
Version 1.0.1 to 1.1
  • Added possibility for indexed encoding.
    PngEncoder encoder = new PngEncoder(PngEncoder.COLOR_INDEXED);
  • Added possibility for grayscale encoding.
    PngEncoder encoder = new PngEncoder(PngEncoder.COLOR_GRAYSCALE);
Version 1.0 to 1.0.1
  • Removed the obfuscation from the public fields COLOR_INDEXED COLOR_TRUECOLOR, DEFAULT_COMPRESSION, BEST_SPEED, and BEST_COMPRESSION.