← Back to team overview

sikuli-driver team mailing list archive

[Question #238095]: Use Pattern with an image object instead of a file path

 

New question #238095 on Sikuli:
https://answers.launchpad.net/sikuli/+question/238095

Hello,

I'm using the Sikuli Java API.
Because I have several small pattern images and which are used multiple times in a program run, I need to load the images from memory, instead of accessing the disk several times. The images are small in size, totaling max 1MB.

I have tried with 
    Pattern.setImage(BufferedImage img)
after initializing the Pattern with a null reference. But when I run the program, it throws find failed exception: Image null cannot be found on disk.
Is there a way to encapsulate the image object in the pattern object?
I don't want the Pattern to read the image from disk every time.

Thank you!
Bogdan T.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.