[Java] Pattern instance using an image within a jar file

Asked by Bevan DeQueker

Hi,

I'd like to instantiate Pattern, but instead of using the path to a standard image file, my image file is stored in a .jar file (which my project has a dependency on)
Is there a way to do this ?

[Context]
I have created a project (P) containing high-level test "steps" that are driven by selenium and sikuli.
Those steps are then called upon by unit test in our main project (A), and also by system test in a QA regression test project (B)
The sikuli captured images are stored in project P.
And are included in P's compiled jar file.

Bevan

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

That is not yet supported by Sikuli itself. You have to write your own loader.

Revision history for this message
Zoltan Magyar (mzotyoka) said :
#2

Hi!

Regarding this problem, there is a constructor for Pattern, which accepts a BufferedImage as a parameter, however I've looked into the source code and it seems to be unimplemented. Is this the case?
If yes, do you have any plans or roadmap for the implementation of this feature?

Thanks in advance!

Revision history for this message
RaiMan (raimund-hocke) said :
#3

@ Zoltan
is on the list for version 1.1

might be in betas earlier ;-)

Revision history for this message
RaiMan (raimund-hocke) said :
#4

now a request bug

Revision history for this message
Zoltan Magyar (mzotyoka) said :
#5

@ RaiMan
Thank you for the quick answer!
Cheers!