Botter Posted July 20, 2012 Share Posted July 20, 2012 I couldn't find how to search for images with transparency with the ImageSearch library, but finally figured it out on my own. I thought I'd share how to do it here since I can't find the info anywhere. Just in case someone else is having trouble with this.Here is a link to the ImageSearch library ( *note I'm using the version by qsek which fixes a memory leak I guess )ImageSearch library thread : Basically you put the *Trans line BEFORE the filename + path, for instance:_ImageSearchArea( "*Trans0xFF00FF " & "test.png", 1, 0, 0, 800, 600, $x, $y, 0 )The *Trans0xFF00FF will ignore all bright pink pixels in test.pngThe *Trans option syntax is explained here: http://www.autohotkey.com/docs/commands/ImageSearch.htmI cannot tell you how arcane this was for a autoit newbie like myself O.o There really should be an imagesearch function built into autoit, the pixel searches are way too slow. SouthLander 1 Link to comment Share on other sites More sharing options...
MrMitchell Posted July 21, 2012 Share Posted July 21, 2012 (edited) I couldn't find how to search for images with transparency with the ImageSearch library, but finally figured it out on my own. I thought I'd share how to do it here since I can't find the info anywhere. Just in case someone else is having trouble with this.Here is a link to the ImageSearch library ( *note I'm using the version by qsek which fixes a memory leak I guess )ImageSearch library thread : Basically you put the *Trans line BEFORE the filename + path, for instance:FYI Sven's version of _ImageSearch() covers transparency as an optional parameter in #entry551948. Edited July 21, 2012 by MrMitchell Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now