Home / Othres / Alpha Exporter

Alpha Exporter

A little tool to seperate the alpha channel from an image that contains transparency, the idea is to reduce the file size. This tool will let you to load an png file then export 2 images : the export image ( the original image but without alpha channel) and an alpha image ( in grey scale ). Base on my test, i got a transparent image (.png) with dimension 1024 x 1024, the size of it is 1.1MB, after exporting the export image is 345KB and the alpha image is 130KB, so you can see this really save a lot of space

To combine it in actionscript :

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

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

This tool is available on GitHub : https://github.com/yiwenl/AlphaExporter


One thought on “Alpha Exporter

  1. Elliot Geno

    28 Nov on 2012 at 19:29:40

    Use ImageAlpha for the Mac… pngmini.com

    It produces PNGs with reduced color palettes. VERY SMALL FILES!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>