Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yiwenl/AlphaExporter

An Alpha Exporter for transparent images
https://github.com/yiwenl/AlphaExporter

Last synced: 3 months ago
JSON representation

An Alpha Exporter for transparent images

Awesome Lists containing this project

README

        

This is a simple tool to separate a image with transparency into 2 different non-transparent images, in order to reduce the file size.

To recreate the original image with actionscript :

// _bmpdExport : the export image without alpha channel
// _bmpdAlpha : the alpha image

var bmpd:BitmapData = new BitmapData(_bmpd.width, _bmpd.height, true, 0x00000000);
bmpd.draw(_bmpdExport);
bmpd.copyChannel(_bmpdAlpha, bmpd.rect, new Point, BitmapDataChannel.RED, BitmapDataChannel.ALPHA);
_container.addChild(new Bitmap(bmpd));