Class SubsamplingFilter

  • All Implemented Interfaces:
    java.awt.image.ImageConsumer, java.lang.Cloneable

    public class SubsamplingFilter
    extends java.awt.image.ReplicateScaleFilter
    An ImageFilter class for subsampling images.

    It is meant to be used in conjunction with a FilteredImageSource object to produce subsampled versions of existing images.

    Version:
    $Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-core/src/main/java/com/twelvemonkeys/image/SubsamplingFilter.java#1 $
    See Also:
    FilteredImageSource
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int xSub  
      private int ySub  
      • Fields inherited from class java.awt.image.ReplicateScaleFilter

        destHeight, destWidth, outpixbuf, srccols, srcHeight, srcrows, srcWidth
      • Fields inherited from class java.awt.image.ImageFilter

        consumer
      • Fields inherited from interface java.awt.image.ImageConsumer

        COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
    • Constructor Summary

      Constructors 
      Constructor Description
      SubsamplingFilter​(int pXSub, int pYSub)
      Creates a SubsamplingFilter.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void setDimensions​(int pWidth, int pHeight)
      ImageFilter implementation, do not invoke.
      • Methods inherited from class java.awt.image.ReplicateScaleFilter

        setPixels, setPixels, setProperties
      • Methods inherited from class java.awt.image.ImageFilter

        clone, getFilterInstance, imageComplete, resendTopDownLeftRight, setColorModel, setHints
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • xSub

        private int xSub
      • ySub

        private int ySub
    • Constructor Detail

      • SubsamplingFilter

        public SubsamplingFilter​(int pXSub,
                                 int pYSub)
        Creates a SubsamplingFilter.
        Parameters:
        pXSub -
        pYSub -
        Throws:
        java.lang.IllegalArgumentException - if pXSub or pYSub is less than 1.
    • Method Detail

      • setDimensions

        public void setDimensions​(int pWidth,
                                  int pHeight)
        ImageFilter implementation, do not invoke.
        Specified by:
        setDimensions in interface java.awt.image.ImageConsumer
        Overrides:
        setDimensions in class java.awt.image.ReplicateScaleFilter