Writing the Alpha Channel

BlitzMax Forums/BlitzMax Beginners Area/Writing the Alpha Channel

CASO(Posted 2007) [#1]
Is it possible? I would be able to write/manipulate the alpha channel (of individual pixels) and save to a png file but don't quite know how to do it. Do I need to use pixmaps?


JazzieB(Posted 2007) [#2]
Yes, you need to use pixmaps. To write pixel information use the WritePixel command. To save, use SavePixmapPNG (I think).


CASO(Posted 2007) [#3]
Does that work with/save the alpha channel?


ImaginaryHuman(Posted 2007) [#4]
Just make sure that when you create the pixmap, or load it, that you ConvertPixmap() to one of the formats that has an alpha channel in it, such as RGBA or ARGB. Then you will HAVE an alpha channel to manipulate, and it will then be saved with the PNG.