Package net.thucydides.core.images
Class ResizableImage
java.lang.Object
net.thucydides.core.images.ResizableImage
- Direct Known Subclasses:
ResizedImage
public class ResizableImage
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description ResizableImage(java.io.File screenshotFile)
-
Method Summary
Modifier and Type Method Description int
getHeight()
protected org.slf4j.Logger
getLogger()
int
getWidth()
static ResizableImage
loadFrom(java.io.File screenshotFile)
ResizableImage
rescaleCanvas(int height)
protected ResizableImage
resizeImage(int width, int targetHeight, java.awt.image.BufferedImage image)
void
saveTo(java.io.File savedFile)
If no resize operation has been done, just copy the file.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ResizableImage
public ResizableImage(java.io.File screenshotFile) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Details
-
getLogger
protected org.slf4j.Logger getLogger() -
loadFrom
- Throws:
java.io.IOException
-
getWidth
public int getWidth() -
getHeight
public int getHeight() -
rescaleCanvas
- Throws:
java.io.IOException
-
resizeImage
protected ResizableImage resizeImage(int width, int targetHeight, java.awt.image.BufferedImage image) throws java.io.IOException- Throws:
java.io.IOException
-
saveTo
public void saveTo(java.io.File savedFile) throws java.io.IOExceptionIf no resize operation has been done, just copy the file. Otherwise we should be applying the saveTo() method on the ResizedImage class.- Throws:
java.io.IOException
-