You could do it by looping through the pixels, 1 at a time starting from top-left, and bottom-right till you find a non-white pixel. Sort of like this...
First use getPixel
var j:Number = 0;
var i:Number = 0;
var tl_corner:Point; // top left corner
var br_corner:Point; // bottom right corner
for (j = 0; j < imageBitmapData.height; j++) {
for (i = 0; i < imageBitmapData.width; i++) {
if (imageBitmapData.getPixel(i, j) != 0xFFFFFF) {
tl_corner = new Point(i, j)
}
}
}
for (j = imageBitmapData.height - 1; j >= 0; j--) {
for (i = imageBitmapData.width - 1; i >= 0; i--) {
if (imageBitmapData.getPixel(i, j) != 0xFFFFFF) {
br_corner = new Point(i, j)
}
}
}
Now you have the top left and bottom right corners of the actual image, without the white.
Now use copyPixels
var bmd:BitmapData = new BitmapData(br_corner.x - tl_corner.x, br_corner.y - tl_corner.y, false, 0x00000000);
bmd.copyPixels(imageBitmapData, new Rectangle(tl_corner.x, tl_corner.y, (br_corner.x - tl_corder.y), (br_corner.y - tl_corner.y)), new Point(0, 0));
Now you have a BitmapData object with only the pixels you want. Do with it as you please, maybe:
var s:Sprite = new Sprite();
var bmp:Bitmap = new Bitmap(bmd);
s.addChild(bmp);