Sign in to follow this  
Followers 0
Botter

How to get transparency with ImageSearch Library

2 posts in this topic

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.png

The *Trans option syntax is explained here: http://www.autohotkey.com/docs/commands/ImageSearch.htm

I 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.

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by MrMitchell

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0