sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #02251
Re: [Question #152776]: extracting images
Question #152776 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/152776
Status: Open => Answered
RaiMan proposed the following answer:
try this
reg = Region(0,0,100,100) # only for this example: replace it with
whatever region you have evaluated before
img = capture(reg)
print img # you see the image filename in temp dir
find(img).highlight(2) # see that image can be used and found
# if you want to save the image permanently in your script
import os, shutil
dir = getBundlePath()
print dir
img_saved = "name-it-as-you-like.png" # this avoids the deletion, when saving the script
shutil.move(img, os.path.join(dir, img_saved))
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.