Transparency

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
ggripp
Newbie
Posts: 4
Joined: Tue Dec 22, 2015 9:42 am

Transparency

Post by ggripp » Fri Nov 18, 2016 7:15 pm

How can i find an image with transparent background?
I can make it work using CCOEFF but I need to find multiple results of the same image, and CCOEFF only returns 1 result.
And EXACT don't work with PNG...

TL;DR: I need to find all coordinates of a screen that match with a image with transparent background.

Thanks in advance

sorry about my bad english

User avatar
JRL
Automation Wizard
Posts: 3501
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Transparency

Post by JRL » Sat Nov 19, 2016 5:36 am

Yes, you have to use "EXACT" as the algorithm parameter to acquire multiple FindImagePos> results, so you will need the needle image to be a bitmap. The transparent portion of your image will hardly ever match properly anyway since the background could be anything. Use an area of the image that is not transparent for the needle image.

And as a point of interest, bitmaps can have a transparent color. See HERE

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts