Transparent PNG is BLACK

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
TheDewd
Posts: 1513
Joined: 19 Dec 2013, 11:16
Location: USA

Transparent PNG is BLACK

Post by TheDewd » 09 Sep 2022, 21:13

I'm adding Picture controls to my Gui, which will overlap each other as layers.

I've added a fully transparent PNG image with +BackgroundTrans on top of another image, but the transparent picture is BLACK instead of showing the image behind it.

I also tried without +BackgroundTrans, giving the same result.

If I modify the transparent image to add 1 pixel of color anywhere within, it will show correctly in the Gui.

Any ideas?

If there is no way to fix this, is there perhaps a way to determine if an image is fully transparent with no added pixels? If so, I could then just make the image hidden.

FYI -- the script is designed to use images provided by other users, so I have to make it work without knowing what images will be supplied.

Obviously, I could do it with GDI+ but I wanted to try the simple way first.

Return to “Ask for Help (v1)”