← Back to team overview

sikuli-driver team mailing list archive

[Bug 1220575] Re: [1.0.1] Linux: Matching preview not working

 

Hello RaiMan,

This issue is also affecting me. I did some debugging and found the
origin of the problem.

In the method
org.sikuli.ide.PatternSimilaritySlider.getScoreColor(double score) there
is the following:

// map alpha to 20~150
		Color cMask = new Color(
						c.getRed(), c.getGreen(), c.getBlue(), 20 + (int) (score * 130));

The values passed in here for the new color are:
0, 255, 128, 258.

The 258 is the problem as the maximum allowed is 255.

In my case, the score is 1.8333333730697632. I am not entirely sure yet
how the Similarity works, so I cannot really tell if this score is
correct or not.

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1220575

Title:
  [1.0.1] Linux: Matching preview not working

Status in Sikuli:
  In Progress

Bug description:
  This is a Linux only issue (java version "1.7.0_25")

  Open IDE editor, click a image saved before.  Click "Matching
  Preview",  it will not work. You can got error message from console:

  Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Color parameter outside of expected range: Alpha
  at java.awt.Color.testColorValueRange(Unknown Source)
  at java.awt.Color.<init>(Unknown Source)
  at org.sikuli.ide.PatternSimilaritySlider.getScoreColor(PatternSimilaritySlider.java:59)
  at org.sikuli.ide.PatternSimilaritySlider.paintComponent(PatternSimilaritySlider.java:37)
  at javax.swing.JComponent.paint(Unknown Source)
  ... more

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1220575/+subscriptions


References