public class ImageUtils extends Object
| Constructor and Description |
|---|
ImageUtils() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
encodeAsPng(BufferedImage image)
Encodes a given image as PNG.
|
static BufferedImage |
getImagePart(BufferedImage image,
Region region)
Get a copy of the part of the image given by region.
|
static BufferedImage |
imageFromBase64(String image64)
Creates a
BufferedImage instance from a base64 encoding of an
image's bytes. |
static BufferedImage |
imageFromBytes(byte[] imageBytes)
Creates a BufferedImage instance from raw image bytes.
|
static BufferedImage |
imageFromFile(String path)
Creates a
BufferedImage from an image file specified by path. |
public static byte[] encodeAsPng(BufferedImage image)
image - The image to encode.public static BufferedImage imageFromFile(String path) throws EyesException
BufferedImage from an image file specified by path.path - The path to the image file.BufferedImage instance.EyesException - If there was a problem
creating the BufferedImage instance.public static BufferedImage imageFromBase64(String image64) throws EyesException
BufferedImage instance from a base64 encoding of an
image's bytes.image64 - The base64 encoding of an image's bytes.BufferedImage instance.EyesException - If there was a problem
creating the BufferedImage instance.public static BufferedImage imageFromBytes(byte[] imageBytes) throws EyesException
imageBytes - The raw bytes of the image.EyesException - If there was a problem
creating the BufferedImage instance.public static BufferedImage getImagePart(BufferedImage image, Region region)
image - The image from which to get the part.region - The region which should be copied from the image.Copyright © 2015. All rights reserved.