Original Image Location

Is it possible to find the original coordinates of an image where it was captured?

For example, if you capture the Start icon, can you get the coordinates of that Start icon image without doing ImageLocation()? So basically, the properties of the image.

I need to have some value like this as the return - (200,200,300,300)

Comments

  • EggplantMattEggplantMatt ForumAdmin admin
    The ImageInfo() function will allow you to access the original upper-left corner coordinates and the size of the image. From those values you can get the rectangle defining the original capture area:
    put imageInfo("Start Icon").CaptureLocation into upperLeft
    put upperLeft plus imageInfo("Start Icon").ImageSize into lowerRight
    put (upperLeft, lowerRight) into captureArea
    
    This will give you the values in the form:
    ((x1,y1),(x2,y2))
    
    If that's not close enough (it should work for any SenseTalk functions that need a rectangle), you could also do this:
    put (upperleft.x, upperleft.y, lowerRight.x, lowerRight.y) into captureArea
    
  • Works great! Thanks!
Sign In or Register to comment.