Check for alpha channel with maxscript

Any one who can help me with this.
I want to check for an existing alpha channel in a bitmap within a texturemap.
This should be possible just cant find it anywhere in the docs.

Thanks

dennis

take it into photoshop. take a look at the channels tab. if theres an alpha channel your good.

thanks for your input, but i really would like it to be scripted, i should have said so in the message body and not just in the title.

oops sorry missed your thread title. :smile:

Probably the easiest way to do it would be with the AVGuard extension by Larry Minton…

AVG 7.06 for max 7, http://www.scriptspot.com/extensions/web\_upload/Larry%20Minton/avg\_dlx70\_6.zip

AVG for max 6.08, http://www.scriptspot.com/extensions/web\_upload/Larry%20Minton/avg\_dlx60\_8.zip

It has a function “getBitmapInfo” that does this and more very easy…

getBitmapInfo {<filename> | <bitmap>}
    Returns information on the specified bitmap file as an 13 element array. Array elements
    are:
    1. Expanded bitmap file name as String
    2. Device name as String
    3. Bitmap width as Integer
    4. Bitmap height as Integer
    5. Number of bits for each RGB component value as Integer
    6. Number of bits for alpha component as Integer.
    7. The aspect ratio of the bitmap as Float
    8. The gamma of the bitmap as Float
    9. Whether the bitmap has alpha as a Boolean
    10. First frame as Integer
    11. Last frame as Integer
    12. The bitmap type (from BitmapInfo::Type()) as Integer. See topic “Bitmap Types” in the SDK help file
        for more info on the bitmap types.
    13. The bitmap flags (from BitmapInfo::Flags()) as Integer. See topic “Bitmap Flags” in the SDK help file for
        more info on the meaning of each bit.

cheers mate. Will try it.

Cant belive its not possible with a single property or method, should be easy.
At the moment i read pixels and check for alpha values below 255, in worst case scenarios this is dreadfull slow. So thanks