I can't seem to get the return_offset correct. I want the top left and bottom right. This comes from the help file.
return_offset is used to determine which coordinates should be returned and can be one of the following:
0 Top left position of located image within bitmap_to_scan. In other words X, Y is the top left corner of needle_bitmap within haystack
1 Center: X,Y will be set to the center of the located image within the main haystack image.
2 Top right
3 Bottom left
4 Bottom right
5 Middle top
6 Middle bottom
7 Middle left
8 Middle right
Code I am using - notice the 0 and 4 for top left and bottom right
FindImagePos>c:\temp2\region.JPG,SCREEN,0.7,0,TXArr,TYArr,NumFound,CCOEFF
FindImagePos>c:\temp2\region.JPG,SCREEN,0.7,4,BXArr,BYArr,NumFound,CCOEFF
MDL>%TXArr_0%,%TYArr_0%,%BXArr_0%,%BYArr_0%,c:\temp2\area2.JPG
This is what comes from the message box
3678,97,3678,97,c:\temp2\area2.JPG (both appear to be the top left
FindImagePos and return_offset
Moderators: JRL, Dorian (MJT support)
Re: FindImagePos and return_offset
Hi Keith,
The image offset parameter only works with BMP or PNG files. Only returns top left location of JPGs no matter what you attempt to specify.
The image offset parameter only works with BMP or PNG files. Only returns top left location of JPGs no matter what you attempt to specify.
Re: FindImagePos and return_offset
I didn't notice that in the help file. I'll think of something else.
Thanks
Thanks
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: FindImagePos and return_offset
JPG aren't supported *AT ALL* in this function. The help file says:
needle_bitmap should be a fully qualified path to a bitmap or png file (see MatchAlgorithm type below for supported image types).
MatchAlgorithm goes on to say that EXACT *only* works with BMP files while CCOEFF works with PNG or BMP
Again - there is no support for JPG.
needle_bitmap should be a fully qualified path to a bitmap or png file (see MatchAlgorithm type below for supported image types).
MatchAlgorithm goes on to say that EXACT *only* works with BMP files while CCOEFF works with PNG or BMP
Again - there is no support for JPG.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?