C# Class XamlBrewer.Uwp.Controls.Helpers.CropBitmap

Exibir arquivo Open project: XamlBrewer/UWP-ImageCropper-

Public Methods

Method Description
GetCroppedBitmapAsync ( StorageFile originalImageFile, Point startPoint, Size corpSize, double scale ) : Task

Get a cropped bitmap from a image file.

Private Methods

Method Description
GetPixelData ( BitmapDecoder decoder, uint startPointX, uint startPointY, uint width, uint height ) : Task

Use BitmapTransform to define the region to crop, and then get the pixel data in the region

GetPixelData ( BitmapDecoder decoder, uint startPointX, uint startPointY, uint width, uint height, uint scaledWidth, uint scaledHeight ) : Task

Use BitmapTransform to define the region to crop, and then get the pixel data in the region. If you want to get the pixel data of a scaled image, set the scaledWidth and scaledHeight of the scaled image.

Method Details

GetCroppedBitmapAsync() public static method

Get a cropped bitmap from a image file.
public static GetCroppedBitmapAsync ( StorageFile originalImageFile, Point startPoint, Size corpSize, double scale ) : Task
originalImageFile Windows.Storage.StorageFile /// The original image file. ///
startPoint Point /// The start point of the region to be cropped. ///
corpSize Windows.Foundation.Size /// The size of the region to be cropped. ///
scale double
return Task