var resultShirt:BitmapData = new BitmapData(toWidth, toHeight);

var copyMatrix:Matrix = new Matrix;
copyMatrix.scale(toWidth/530, toHeight/300);

resultShirt.draw(shirtObj, copyMatrix);

return resultShirt;