Class PngPlteChunk

java.lang.Object
org.eclipse.swt.internal.image.PngChunk
org.eclipse.swt.internal.image.PngPlteChunk

class PngPlteChunk extends PngChunk
  • Field Details

    • paletteSize

      int paletteSize
  • Constructor Details

    • PngPlteChunk

      PngPlteChunk(PaletteData palette)
    • PngPlteChunk

      PngPlteChunk(byte[] reference)
  • Method Details

    • getChunkType

      int getChunkType()
      Overrides:
      getChunkType in class PngChunk
    • getPaletteSize

      int getPaletteSize()
      Get the number of colors in this palette.
    • getPaletteData

      PaletteData getPaletteData()
      Get a PaletteData object representing the colors stored in this PLTE chunk. The result should be cached as the PLTE chunk does not store the palette data created.
    • setPaletteData

      void setPaletteData(PaletteData palette)
      Set the data of a PLTE chunk to the colors stored in the specified PaletteData object.
    • validate

      void validate(PngFileReadState readState, PngIhdrChunk headerChunk)
      Answer whether the chunk is a valid PLTE chunk.
      Overrides:
      validate in class PngChunk
    • contributeToString

      void contributeToString(StringBuilder buffer)
      Description copied from class: PngChunk
      Provided so that subclasses can override and add data to the toString() call.
      Overrides:
      contributeToString in class PngChunk