Class FormatRed

  • All Implemented Interfaces:
    java.awt.image.RenderedImage, CachableRed

    public class FormatRed
    extends AbstractRed
    This allows you to specify the ColorModel, Alpha premult and/or SampleModel to be used for output. If the input image lacks Alpha and alpha is included in output then it is filled with alpha=1. In all other cases bands are simply copied.
    Version:
    $Id: FormatRed.java 1732018 2016-02-24 04:51:06Z gadams $ Originally authored by Thomas DeWeese.
    • Constructor Detail

      • FormatRed

        public FormatRed​(CachableRed cr,
                         java.awt.image.SampleModel sm)
        Construct an instance of CachableRed around a BufferedImage.
      • FormatRed

        public FormatRed​(CachableRed cr,
                         java.awt.image.ColorModel cm)
    • Method Detail

      • getSource

        public CachableRed getSource()
        fetch the source image for this node.
      • getProperty

        public java.lang.Object getProperty​(java.lang.String name)
        Specified by:
        getProperty in interface java.awt.image.RenderedImage
        Overrides:
        getProperty in class AbstractRed
      • getPropertyNames

        public java.lang.String[] getPropertyNames()
        Specified by:
        getPropertyNames in interface java.awt.image.RenderedImage
        Overrides:
        getPropertyNames in class AbstractRed
      • copyData

        public java.awt.image.WritableRaster copyData​(java.awt.image.WritableRaster wr)
      • makeSampleModel

        public static java.awt.image.SampleModel makeSampleModel​(CachableRed cr,
                                                                 java.awt.image.ColorModel cm)
      • makeColorModel

        public static java.awt.image.ColorModel makeColorModel​(CachableRed cr,
                                                               java.awt.image.SampleModel sm)