Any way to know I have Alpha in my Filetexture?

I have a folder with pictures, some PNGs have Alpha, some have not, any easy way to figure out I am dealing with a PNG file that has actual transparent pixels?

yo bruh bruh,

IMAGEMAGIK’s IDENTIFY comand line script will return rgba if you have transparency or just rgb if opaque.

hope it helps, if you need something slightly different or more powerful like a batch doing check on 200 images or something, let me know…

Nahhh… it is just, if I have alpha, I need to take care of whatever I am doing behind it, script is interesting. Now I am going to figure out how to use it LOL.

Hey west, Info (EX9.Texture) is of any help?
I made this; very quickly, tbh, but it can shed some light, maybe…

4west.v4p (6.9 kB)

@h99, thnx I looked at that, but PNG files who do not have transparent pixels, but are stored with the same format, will also show up.

Of course I can patch something with a pipet, and when a I have a pixels with alpha NOT 1, than it is what I look for.

Thinking about this, a simple pixel shader should be able to do this. Any takers? :)

Example of my question (10.7 kB)

that’s the easiest way that came to my mind.

AlphaCheck.v4p (2.6 kB)

or like this…

AlphaCheck.v4p (15.0 kB)

With this png, sebl (otherwise working) second patch doesn’t return a correct result; or does it happen only on my system? (3.3 kB)

there was an error (the quad on topright was disabled).

and it worked here, the patch detects there’s alpha in the image.

but only the solution on the right side worked for that image, what is a bit strange. also, your image doesn’t properly show its alpha channel in photoshop…

AlphaCheck_0.v4p (14.9 kB)

Hi, sebl. I trusted desktop icon preview. File is cropped and saved with Irfanview. Who knows, probably PS relies on ogl, and this file is good only on dx.

There was something strange, indeed: right side was always true.

Anyway I ended patching something CPU heavy, reliable, not really good for live patching, and working with a pipet method, (stolen something from your patch). (4.8 kB)

Thanks thanks thanks, I did not know we had a node that Texture split node to get all the pixels :)

Not sure if it is efficient with high res pictures, but we will see. Thnx @sebl))and ((user:h99 :)

hei west,
you could pass the alpha channel to histogram and see all shades of alpha