SikuliX IDE - Get Pixels

Asked by Javier Gonzales Rodriguez

Hello there,

I already tried/read about importing "PIL, Image" from sikuliX IDE.

Does anyone knows how to get pixels from an image using jython/SikuliX IDE?

I made an update to my jython to the latest "2.7.2" and am using ubuntu 20.04

Thanks, regards!

Question information

English Edit question
SikuliX Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :

PIL does not work with Jython (C-based).

SikuliX has a (secret ;-) feature Location.getColor(), which returns a Java object Color.

How to get the color information from that object, look at the java docs:

In SikuliX scripts you principally can use any Java classes.

You might find a suitable Java library, put it on the class path at runtime and use it.

Revision history for this message
Javier Gonzales Rodriguez (stonegarden21) said :

Thanks RaiMan, that solved my question.