Class PixelArtUpscalingFilter

  • All Implemented Interfaces:
    java.awt.image.BufferedImageOp

    public class PixelArtUpscalingFilter
    extends AbstractImageFilter
    An image filter that upscales images to twice their original size. As it uses an algorithm optimized for small or low-resolution images, it often produces better results than standard sampling algorithms on icons and pixel art.

    In-place filtering: This class does not support in-place filtering (the source and destination images must be different). Moreover the destination must be of exactly double the width and height of the source.

    Since:
    3.4
    Author:
    Chris Jennings
    • Constructor Detail

      • PixelArtUpscalingFilter

        public PixelArtUpscalingFilter()
    • Method Detail

      • getBounds2D

        public java.awt.geom.Rectangle2D getBounds2D​(java.awt.image.BufferedImage source)
        Description copied from class: AbstractImageFilter

        The base implementation returns the bounds of the image in image space; that is, the rectangle defined by 0, 0, source.getWidth(), source.getHeight().

        Specified by:
        getBounds2D in interface java.awt.image.BufferedImageOp
        Overrides:
        getBounds2D in class AbstractImageFilter
      • getPoint2D

        public java.awt.geom.Point2D getPoint2D​(java.awt.geom.Point2D sourcePoint,
                                                java.awt.geom.Point2D destPoint)
        Description copied from class: AbstractImageFilter

        The base implementation returns a copy of the original point.

        Specified by:
        getPoint2D in interface java.awt.image.BufferedImageOp
        Overrides:
        getPoint2D in class AbstractImageFilter
      • createCompatibleDestImage

        public java.awt.image.BufferedImage createCompatibleDestImage​(java.awt.image.BufferedImage source,
                                                                      java.awt.image.ColorModel destinationColorModel)
        Description copied from class: AbstractImageFilter
        Specified by:
        createCompatibleDestImage in interface java.awt.image.BufferedImageOp
        Overrides:
        createCompatibleDestImage in class AbstractImageFilter
      • filter

        public java.awt.image.BufferedImage filter​(java.awt.image.BufferedImage src,
                                                   java.awt.image.BufferedImage dest)