Package org.sikuli.script
Class ScreenImage
java.lang.Object
org.sikuli.script.ScreenImage
public class ScreenImage extends Object
CANDIDATE FOR DEPRECATION
stores a BufferedImage usually ceated by screen capture,
the screen rectangle it was taken from and
the filename, where it is stored as PNG (only if requested)
This will be replaced by Image in the long run
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ScreenImage(Rectangle roi, BufferedImage img)create ScreenImage with given -
Method Summary
Modifier and Type Method Description booleanequals(Object other)LocationgetEnd()StringgetFile()INTERNAL USE: use getTimedFile() insteadStringgetFile(String path)stores the image as PNG file in the given path with a created filename (sikuliximage-timestamp.png)StringgetFile(String path, String name)stores the image as PNG file in the given path with the given filenameStringgetFilename()Deprecated.use getFile() insteadBufferedImagegetImage()RegiongetRegion()RectanglegetROI()LocationgetStart()StringgetStoredAt()ScreenImagegetSub(Rectangle sub)Stringsave()stores the image as PNG file in the standard temp folder with a created filename (sikuliximage-timestamp.png) if not yet stored beforeStringsave(String path)stores the image as PNG file in the given path with a created filename (sikuliximage-timestamp.png)Stringsave(String path, String name)stores the image as PNG file in the given path with a created filename (givenName-timestamp.png)StringsaveInBundle(String name)voidsaveLastScreenImage(File fPath)voidsetStartEnd(Location start, Location end)
-
Field Details
-
Constructor Details
-
ScreenImage
create ScreenImage with given- Parameters:
roi- the rectangle it was taken fromimg- the BufferedImage
-
-
Method Details
-
setStartEnd
-
getStart
-
getEnd
-
getSub
-
getFilename
Deprecated.use getFile() insteadcreates the PNG tempfile only when needed.- Returns:
- absolute path to stored tempfile
- Throws:
IOException- if not found
-
getFile
INTERNAL USE: use getTimedFile() instead- Returns:
- absolute path to stored file
-
getStoredAt
-
save
stores the image as PNG file in the standard temp folder with a created filename (sikuliximage-timestamp.png) if not yet stored before- Returns:
- absolute path to stored file
-
getFile
stores the image as PNG file in the given path with a created filename (sikuliximage-timestamp.png)- Parameters:
path- valid path string- Returns:
- absolute path to stored file
-
save
stores the image as PNG file in the given path with a created filename (sikuliximage-timestamp.png)- Parameters:
path- valid path string- Returns:
- absolute path to stored file
-
save
stores the image as PNG file in the given path with a created filename (givenName-timestamp.png)- Parameters:
path- valid path stringname- file name- Returns:
- absolute path to stored file
-
getFile
stores the image as PNG file in the given path with the given filename- Parameters:
path- valid path stringname- filename (.png is added if not present)- Returns:
- absolute path to stored file
-
saveInBundle
-
getImage
- Returns:
- the stored image in memory
-
getRegion
- Returns:
- the Region, the iamge was created from
-
getROI
- Returns:
- the screen rectangle, the iamge was created from
-
saveLastScreenImage
-
equals
-