net.thucydides.core.images
Class ResizableImage

Package class diagram package ResizableImage
java.lang.Object
  extended by net.thucydides.core.images.ResizableImage
Direct Known Subclasses:
ResizedImage

public class ResizableImage
extends Object


Constructor Summary
ResizableImage(File screenshotFile)
           
 
Method Summary
 int getHeight()
           
protected  org.slf4j.Logger getLogger()
           
 int getWitdh()
           
static ResizableImage loadFrom(File screenshotFile)
           
 ResizableImage rescaleCanvas(int height)
           
protected  ResizableImage resizeImage(int width, int targetHeight, BufferedImage image)
           
 void saveTo(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 Detail

ResizableImage

public ResizableImage(File screenshotFile)
               throws IOException
Throws:
IOException
Method Detail

getLogger

protected org.slf4j.Logger getLogger()

loadFrom

public static ResizableImage loadFrom(File screenshotFile)
                               throws IOException
Throws:
IOException

getWitdh

public int getWitdh()

getHeight

public int getHeight()

rescaleCanvas

public ResizableImage rescaleCanvas(int height)
                             throws IOException
Throws:
IOException

resizeImage

protected ResizableImage resizeImage(int width,
                                     int targetHeight,
                                     BufferedImage image)
                              throws IOException
Throws:
IOException

saveTo

public void saveTo(File savedFile)
            throws IOException
If no resize operation has been done, just copy the file. Otherwise we should be applying the saveTo() method on the ResizedImage class.

Throws:
IOException


Copyright © 2011-2012 Wakaleo Consulting. All Rights Reserved.