public class ScreenImage extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
_filename |
protected BufferedImage |
_img |
protected Rectangle |
_roi |
int |
h
x, y, w, h of the stored ROI
|
int |
w
x, y, w, h of the stored ROI
|
int |
x
x, y, w, h of the stored ROI
|
int |
y
x, y, w, h of the stored ROI
|
| Constructor and Description |
|---|
ScreenImage(Rectangle roi,
BufferedImage img)
create ScreenImage with given
|
| Modifier and Type | Method and Description |
|---|---|
String |
getFile()
INTERNAL USE: use getTimedFile() instead
|
String |
getFile(String path)
stores the image as PNG file in the given path
with a created filename (sikuliximage-timestamp.png)
|
String |
getFile(String path,
String name)
stores the image as PNG file in the given path
with the given filename
|
String |
getFilename()
Deprecated.
use getFile() instead
|
BufferedImage |
getImage() |
Region |
getRegion() |
Rectangle |
getROI() |
ScreenImage |
getSub(Rectangle sub) |
String |
save()
stores the image as PNG file in the standard temp folder
with a created filename (sikuliximage-timestamp.png)
if not yet stored before
|
String |
save(String path)
stores the image as PNG file in the given path
with a created filename (sikuliximage-timestamp.png)
|
String |
save(String path,
String name)
stores the image as PNG file in the given path
with a created filename (givenName-timestamp.png)
|
String |
saveInBundle(String name) |
void |
saveLastScreenImage(File fPath) |
public int x
public int y
public int w
public int h
protected Rectangle _roi
protected BufferedImage _img
protected String _filename
public ScreenImage(Rectangle roi, BufferedImage img)
roi - the rectangle it was taken fromimg - the BufferedImagepublic ScreenImage getSub(Rectangle sub)
@Deprecated public String getFilename() throws IOException
IOException - if not foundpublic String getFile()
public String save()
public String getFile(String path)
path - valid path stringpublic String save(String path)
path - valid path stringpublic String save(String path, String name)
path - valid path stringname - file namepublic String getFile(String path, String name)
path - valid path stringname - filename (.png is added if not present)public BufferedImage getImage()
public Region getRegion()
public Rectangle getROI()
public void saveLastScreenImage(File fPath)
Copyright © 2017. All rights reserved.