Package com.storedobject.common
Class ImageUtility
java.lang.Object
com.storedobject.common.ImageUtility
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BufferedImageClip an image.static BufferedImagetoBufferedImage(Image image) Convert an image to aBufferedImage.
-
Constructor Details
-
ImageUtility
public ImageUtility()
-
-
Method Details
-
toBufferedImage
Convert an image to aBufferedImage.- Parameters:
image- Image to convert- Returns:
- Buffered image.
-
clip
Clip an image.- Parameters:
image- Image to clipmargin- Margin on each side.- Returns:
- Clipped image as a
BufferedImage.Nullwill be returned if enough margin is not available on the image passed.
-