← Back to team overview

sikuli-driver team mailing list archive

[Bug 897895] Re: [request] Java: Pattern class should retain image on Pattern constructor with an awt.BufferedImage

 

Thanks. The developers will have a look at it.

** Summary changed:

- Pattern class does not copy image on Pattern  constructor
+ [request] Java: Pattern class should retain image on Pattern constructor with an awt.BufferedImage

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

Title:
  [request] Java: Pattern class should retain image on Pattern
  constructor with an awt.BufferedImage

Status in Sikuli:
  New

Bug description:
  The class org.sikuli.script.Pattern does not copy the image for the
  constructor which takes Pattern as the parameter.

  public Pattern(Pattern p){
        imgURL = p.imgURL;
        similarity = p.similarity;
        dx = p.dx;
        dy = p.dy;
     }

  Should also include image = p.image

  The consequence is that when you do the following:

  p = new Pattern( bufferedImage );
  x = p.similarity( 0.9f ) or x = p.exact()

  x no longer contains the image. Therefore it is not currently possible
  to change the similarity when using a Pattern based on an image.

  Another great thing would be to have a constructor which takes
  BufferedImage and similarity.

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


References