public class BufferedImageUtils extends Object
Constructor and Description |
---|
BufferedImageUtils() |
Modifier and Type | Method and Description |
---|---|
static BufferedImage |
base64ToImage(String imageString) |
static BufferedImage |
copyBufferedImage(BufferedImage bi)
Copy a
BufferedImage |
static BufferedImage |
copyBufferedImageToARGB(BufferedImage bi)
Copy a
BufferedImage |
static BufferedImage |
getImageFromClipboard(int type)
Get an image off the system clipboard.
|
static String |
imageToBase64(BufferedImage image,
String type) |
static int |
lerpColorValue(int x0,
int x1,
double frac) |
static BufferedImage |
scaleImageToFit(BufferedImage image,
int maxWidth,
int maxHeight) |
static BufferedImage |
spatialBlurLinear(BufferedImage bi,
Point start,
Point end,
double sigma) |
static BufferedImage |
toBufferedImage(Image img,
int type)
Converts a given Image into a BufferedImage
Applies conversion if the types do not match (useful for greyscale conversion)
|
public static BufferedImage scaleImageToFit(BufferedImage image, int maxWidth, int maxHeight)
public static String imageToBase64(BufferedImage image, String type) throws IOException
IOException
public static BufferedImage base64ToImage(String imageString) throws IOException
IOException
public static BufferedImage toBufferedImage(Image img, int type)
img
- The Image to be convertedtype
- the output image typepublic static BufferedImage getImageFromClipboard(int type)
type
- the image typepublic static BufferedImage copyBufferedImage(BufferedImage bi)
BufferedImage
bi
- the imagepublic static BufferedImage copyBufferedImageToARGB(BufferedImage bi)
BufferedImage
bi
- the imagepublic static BufferedImage spatialBlurLinear(BufferedImage bi, Point start, Point end, double sigma)
public static int lerpColorValue(int x0, int x1, double frac)
Copyright © 2020–2022 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.