I am writing a MovieClip rasterizer which rasterizes all the frames in the specified movieclip. Here's the code for rasterizing:
for ( var i:int = start; i <= end; i++ )
{
//goto the next frame
clip.gotoAndStop( i );
//get the bounds bounds = clip.getBounds(clip);
//create a new bitmapdata container bitmapData = new BitmapData( transformer.width == -1 ? bounds.width : transformer.width, transformer.height == -1 ? bounds.height : transformer.height, transformer.transparent, transformer.color );
if (transformer.matrix.tx == 0 && transformer.matrix.ty == 0) transformer.translateToZero( bounds );
//draw the bitmap data with the transformers bitmapData.draw( this._source, transformer.matrix, transformer.colorTransform, transformer.blendMode, transformer.clipRect, //new Rectangle(0, 0, bounds.width, bounds.height), transformer.smoothing );
//push the data on the array frames.push( bitmapData ); }
Now the result is different - http://i42.tinypic.com/lfv52.jpg - the black one is the rasterized version ( i used a color transform on it to test it :P). Note the head and left shoe. Anyone knows what the problem is? I've seen people adding 'extra' pixels to their boundary box at the BitmapData constructor, but thats the right solution.
Anyone got an idea how to fit in the character nicely?