Re: [Sikuli-driver] [Question #691154]: Transition from 1.1.0 to 2.0.4. Unexpected image search behavior

2020-06-10 Thread RaiMan
Question #691154 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/691154

Linked to bug: #1882947
https://bugs.launchpad.net/bugs/1882947
"[2.0.4] Image.getSub() does not work as expected from 1.1.0"

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #691154]: Transition from 1.1.0 to 2.0.4. Unexpected image search behavior

2020-06-05 Thread Darius Tumas
Question #691154 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/691154

Darius Tumas gave more information on the question:
Not sure is that intentional or not, but the problem seems is with:

Image testImage = Image.create("image_name_in_classpath");
testImage.getSub(x, y, w, h);

getSub returns Image with BufferedImage with custom type when source
image ""image_name_in_classpath" has color profile attached to it,
instead being just standard RGB or SRGB.

Work around without converting source image for now i have used:

Image titleTabStart = new
Image(Image.createSubimage(windowElements.get(), new Rectangle(12, 156,
18, 21)));

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #691154]: Transition from 1.1.0 to 2.0.4. Unexpected image search behavior

2020-06-05 Thread Darius Tumas
Question #691154 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/691154

Darius Tumas gave more information on the question:
When i debug both images by saving them, they do exist, and they do have
expected contents.

OS: Windows 10
Java: OpenJDK 8

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #691154]: Transition from 1.1.0 to 2.0.4. Unexpected image search behavior

2020-06-05 Thread Darius Tumas
Question #691154 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/691154

Description changed to:
As title states i'm converting my Java application from Sikuli 1.1.0 to
2.0.4.

In 1.1.0 Following procedure was:
1. Create image from sprites sheet.
2. Crop to the spot of interest
3. Take focused window as region
4. Find all matches in that region.

final Region program = App.focusedWindow();
Final Image windowElements = Image.create("window_panel_decorations");

Image titleTabStart = windowElements.getSub(12, 156, 18, 21);

final Iterator titleStarts = program.findAll(titleTabStart);

and then logic in iteration.

With 2.0.4 i'm getting following exception and errors:

1. [error] Finder2: makeMat: BufferedImage: type not supported: 0 --- please 
report this problem
2. Exception in thread "main" [error] Finder: __BufferedImage__: (18x21): 
conversion error --- find will fail
org.sikuli.script.SikuliXception: Finder::isValid: image to search is empty
at org.sikuli.script.Finder$FindInput2.isValid(Finder.java:1240)
at org.sikuli.script.Finder$Finder2.doFind(Finder.java:616)
at org.sikuli.script.Finder$Finder2.find(Finder.java:582)
at org.sikuli.script.Finder.findAll(Finder.java:334)
at org.sikuli.script.Region.doFindAll(Region.java:2887)
at org.sikuli.script.Region.access$300(Region.java:28)
at org.sikuli.script.Region$RepeatableFindAll.run(Region.java:3026)
at org.sikuli.script.Region$Repeatable.repeat(Region.java:2926)
at org.sikuli.script.Region.findAll(Region.java:2445)

At current moment, i'm stuck with debuging with what has changed, that
old logic does not work any more. Any help appreciated.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp