Class NullResizer
- java.lang.Object
-
- net.coobird.thumbnailator.resizers.AbstractResizer
-
- net.coobird.thumbnailator.resizers.NullResizer
-
- All Implemented Interfaces:
Resizer
public class NullResizer extends AbstractResizer
AResizerwhich does not actually resize the image.The source image will be drawn at the origin of the destination image.
- Since:
- 0.4.0
-
-
Field Summary
-
Fields inherited from class net.coobird.thumbnailator.resizers.AbstractResizer
KEY_INTERPOLATION, RENDERING_HINTS, UNMODIFIABLE_RENDERING_HINTS
-
-
Constructor Summary
Constructors Modifier Constructor Description NullResizer()Instantiates theNullResizerwhich draws the source image at the origin of the destination image.privateNullResizer(java.lang.Object interpolationValue, java.util.Map<java.awt.RenderingHints.Key,java.lang.Object> hints)This constructor isprivateto prevent the rendering hints from being set, as thisResizerdoes not perform any resizing.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidresize(java.awt.image.BufferedImage srcImage, java.awt.image.BufferedImage destImage)Performs a resize operation from a source image and outputs to a destination image.-
Methods inherited from class net.coobird.thumbnailator.resizers.AbstractResizer
createGraphics, getRenderingHints, performChecks
-
-
-
-
Constructor Detail
-
NullResizer
public NullResizer()
Instantiates theNullResizerwhich draws the source image at the origin of the destination image.
-
NullResizer
private NullResizer(java.lang.Object interpolationValue, java.util.Map<java.awt.RenderingHints.Key,java.lang.Object> hints)This constructor isprivateto prevent the rendering hints from being set, as thisResizerdoes not perform any resizing.- Parameters:
interpolationValue- Not used.hints- Not used.
-
-
Method Detail
-
resize
public void resize(java.awt.image.BufferedImage srcImage, java.awt.image.BufferedImage destImage)Description copied from class:AbstractResizerPerforms a resize operation from a source image and outputs to a destination image.
If the source or destination image is
null, then aNullPointerExceptionwill be thrown.- Specified by:
resizein interfaceResizer- Overrides:
resizein classAbstractResizer- Parameters:
srcImage- The source image.destImage- The destination image.
-
-