Friday, 10 February 2012
There are at least four straightforward ways to recolour BitmapData. They all work by modifying the data directly, so the resulting BitmapData can be used as any other. Because of this they have no rendering cost, and so can be used fairly freely without impacting runtime performance.
One topic I've seen discussed a few times online is what the best format for graphics in Flash is. And the answer is almost always the Bitmap and BitmapData classes. The overriding reason for this is performance, but it is worth looking at the alternatives to consider why this might be.
Wednesday, 8 February 2012
Yesterday I mentioned that the BitmapData function copyPixels can be used to combine image data and alpha data from two different sources. This function has a number of uses, in addition to adding transparency to images that don't have any.
Tuesday, 7 February 2012
Monday, 6 February 2012
This is something I've found very useful for both prototyping and making final art. The idea is to use vector drawing commands to create a bitmap, or more precisely a BitmapData. This can then be instanced hundreds or even thousands of time very cheaply, much more so than using drawing commands.