Package com.jhlabs.image
Class BicubicScaleFilter
- java.lang.Object
-
- com.jhlabs.image.AbstractBufferedImageOp
-
- com.jhlabs.image.BicubicScaleFilter
-
- All Implemented Interfaces:
java.awt.image.BufferedImageOp
,java.lang.Cloneable
public class BicubicScaleFilter extends AbstractBufferedImageOp
Scales an image using bi-cubic interpolation, which can't be done with AffineTransformOp.
-
-
Constructor Summary
Constructors Constructor Description BicubicScaleFilter()
Construct a BicubicScaleFilter which resizes to 256x256 pixels.BicubicScaleFilter(int width, int height)
Constructor for a filter which scales the input image to the given width and height using bicubic interpolation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.image.BufferedImage
filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)
int
getHeight()
int
getWidth()
void
setHeight(int height)
void
setWidth(int width)
java.lang.String
toString()
-
Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB, stringToColor
-
-
-
-
Constructor Detail
-
BicubicScaleFilter
public BicubicScaleFilter()
Construct a BicubicScaleFilter which resizes to 256x256 pixels.
-
BicubicScaleFilter
public BicubicScaleFilter(int width, int height)
Constructor for a filter which scales the input image to the given width and height using bicubic interpolation. Unfortunately, it appears that bicubic actually looks worse than bilinear interpolation on most Java implementations, but you can be the judge.- Parameters:
width
- the width of the output imageheight
- the height of the output image
-
-
Method Detail
-
filter
public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)
-
getHeight
public int getHeight()
-
getWidth
public int getWidth()
-
setHeight
public void setHeight(int height)
-
setWidth
public void setWidth(int width)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-