Flex图片裁剪

http://flexblocks.wordpress.com/2008/02/20/flex-image-cropping-component/

ImageCropper is a free component (licensed under the MIT License) for Adobe Flex that allows an image to be cropped by adjusting the position and dimensions of a cropping rectangle that overlays the image.

 

The image used as the source for the ImageCropper may be provided as a BitmapData object or as a URL that points to an external image.

The component can return the cropped image as a BitmapData object, or it can return a Rectangle that defines the cropped area. Retrieving a Rectangle from the component is useful if the image will be cropped on a server (perhaps by a Content Management System).

In addition to allowing unconstrained cropping, the component may be configured to constrain the cropping rectangle to an aspect ratio. For example, defining a cropping rectangle with a width of 200 pixels and a height of 100 pixels and then enabling the aspect ratio constraint will result in the cropping rectangle maintaining a 2:1 aspect ratio as it is resized.

The size of the cropping rectangle handles may be modified, as may the color and transparency values used for the handles, the cropping rectangle outline, the mask and the background.

Resources:

ImageCropper is copyright © 2008 by Paul Whitelock.

你可能感兴趣的:(Flex)