Store Image in Memory

Asked by Jeff_Vallis on 2019-01-25

I have been storing an area of screen as an image (imageA.pnd) and then checking its position - first to see if clicking scroll bar has moved the item and where is its new position.
I then take the image again still using (imageA.pnd)
The second time I do this I believe that it is using the first image and not the second image.
e.g. if exists(imageA.pnd) ) and find(imageA.pnd)

This could be the result of the speed that my old machine is running at or maybe once it has read an image it caches it and doesnt

Is there a way that I can store an image in memory and use it in exist and find

if I didn't need the new position I could use a Region Change test

Question information

English Edit question
Sikuli Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Best masuo (masuo-ohara) said : #1

By default, images used once are cached.
SikuliX internally manages a cache for the imagefile content (standard 64 MB), where images are held in memory, thus avoiding a reload on subsequent references to the same image file.

HowTo force the update.

Jeff_Vallis (vallis-pj) said : #2

Thanks masuo, that solved my question.