public class ResizableImage extends Object
| Constructor and Description |
|---|
ResizableImage(File screenshotFile) |
| Modifier and Type | Method and Description |
|---|---|
int |
getHeight() |
protected org.slf4j.Logger |
getLogger() |
int |
getWidth() |
static ResizableImage |
loadFrom(File screenshotFile) |
ResizableImage |
rescaleCanvas(int height) |
protected ResizableImage |
resizeImage(int newWidth,
int newHeight,
BufferedImage image) |
protected ResizableImage |
resizeImageVertically(int newHeight,
BufferedImage image) |
void |
saveTo(File savedFile)
If no resize operation has been done, just copy the file.
|
public ResizableImage(File screenshotFile) throws IOException
IOExceptionprotected org.slf4j.Logger getLogger()
public static ResizableImage loadFrom(File screenshotFile) throws IOException
IOExceptionpublic int getWidth()
public int getHeight()
public ResizableImage rescaleCanvas(int height) throws IOException
IOExceptionprotected ResizableImage resizeImage(int newWidth, int newHeight, BufferedImage image) throws IOException
IOExceptionprotected ResizableImage resizeImageVertically(int newHeight, BufferedImage image) throws IOException
IOExceptionpublic void saveTo(File savedFile) throws IOException
IOExceptionCopyright © 2023. All rights reserved.