0 Replies Latest reply on Oct 10, 2006 6:07 AM by LifeBugs

    copyPixels crop image

      i am trying to do cropping of image which is dynamically assigned to a vbox component
      and i have used following Code:

      var bd : BitmapData = new BitmapData(h,w);
      var m1 : Matrix = new Matrix();
      bd.draw(target, m1);
      var puzzlePieceBmp:BitmapData = new BitmapData(target.width,target.height);
      puzzlePieceBmp.copyPixels(bd, new Rectangle(x1,y1,h,w), new Point(0, 0));
      imageid.source = puzzlePieceBmp;

      this is not working properly, The cropped portion is not of desired height and width,

      Can any body suggest me how the Rectangle parameter works for copypixel method.
      Its been more than 2 days i am working on this part and i tired searching all forum ..reading live docs about copypixel but no gain
      please guide me in this
      I would be very grateful