Class OptimizeColorPalette

java.lang.Object
org.jpedal.manipulator.OptimizeColorPalette
All Implemented Interfaces:
org.jpedal.manipulator.Manipulation

public class OptimizeColorPalette extends Object implements org.jpedal.manipulator.Manipulation
Optimizes color palettes so they fit into an indexed colour space.

This losslessly reduces the number of bytes required to represent an image.

See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Optimizes color palettes so they fit into an indexed colour space.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    apply(org.jpedal.io.writer.PdfFile info, org.jpedal.manipulator.ResourceCache cache)
    Applies the manipulation to the current document.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OptimizeColorPalette

      public OptimizeColorPalette(PdfManipulator pdfManipulator)
      Optimizes color palettes so they fit into an indexed colour space.

      This losslessly reduces the number of bytes required to represent an image.

      Parameters:
      pdfManipulator - the PdfManipulator object for the currently loaded document
  • Method Details

    • apply

      public void apply(org.jpedal.io.writer.PdfFile info, org.jpedal.manipulator.ResourceCache cache) throws IOException
      Applies the manipulation to the current document.
      Specified by:
      apply in interface org.jpedal.manipulator.Manipulation
      Parameters:
      info - the PdfFile object for the currently loaded document
      cache - the ResourceCache object for the currently loaded document
      Throws:
      IOException - if the manipulation cannot be applied to the document