# Textfield painted into bitmapdata bug?

**URL:** <https://forum.kirupa.com/t/textfield-painted-into-bitmapdata-bug/280225>\
**Category:** Uncategorized\
**Created:** [January 24, 2009, 2:50pm UTC](https://forum.kirupa.com/t/textfield-painted-into-bitmapdata-bug/280225 "2009-01-24T14:50:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jedierikb](https://avatars.discourse-cdn.com/v4/letter/j/f14d63/32.png) [@jedierikb](https://forum.kirupa.com/u/jedierikb)\
**Post date:** [January 24, 2009, 2:50pm UTC](https://forum.kirupa.com/t/textfield-painted-into-bitmapdata-bug/280225/1 "2009-01-24T14:50:58Z")

</div>

If I create a simple Textfield and place it on the stage, it looks good.

If I take the same Textfield, and paint it into a BitmapData (first putting the Textfield into a Sprite so I can paint it), the resulting BitmapData is not the same, pixel for pixel, as the original textfield on the stage.

Please refer to the attached image for a zoomed in view on the differences in the aliasing.

Why is this? What can I do to keep the two pixel-for-pixel identical?

```auto
private static function doTest( stg:Stage ):void
	{
		var tf:TextField = new TextField();
		tf.text = "TESTING";
		tf.textColor = 0xFF0000;

		var sp:Sprite = new Sprite();
		sp.addChild( tf );

		stg.addChild( sp );

		var bmd:BitmapData = new BitmapData( tf.width, tf.height, true, 0 );
		bmd.draw( sp );
		var bm:Bitmap = new Bitmap( bmd );
		bm.x = 0;
		bm.y = 20;
		stg.addChild( bm );
	}

```
