Crop an Image in Adobe AIR or Flex.

By | February 7, 2011

Below code shows how to crop an image in Adobe AIR. Change the mx:WindowedApplication to mx: Application to run it as a FLEX Application.

The code uses copyPixels to extract the desired part from the image file.

The important line in the below code crops the image.
cropBD.copyPixels(loadBD, new Rectangle(startPoint.x, startPoint.y, squareSize, squareSize),posPoint);



    
        

    
    
    

    
    

    
    

    
    


Leave a Reply

Your email address will not be published. Required fields are marked *