C# Class PhotoSharingApp.Universal.Editing.BitmapTools

Offers some tools for editing bitmaps.
Datei anzeigen Open project: Microsoft/Appsample-Photosharing

Public Methods

Method Description
GetCroppedBitmapAsync ( IRandomAccessStream originalImage, Point startPoint, Size cropSize, double scale ) : Task

Gets the cropped bitmap asynchronously.

Resize ( IRandomAccessStream sourceStream, uint newWidth, uint newHeight ) : Task

Resizes the specified stream.

Rotate ( IRandomAccessStream randomAccessStream, BitmapRotation rotation ) : Task

Rotates the given stream.

Private Methods

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

Gets the pixel data.

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

Gets the cropped bitmap asynchronously.
public static GetCroppedBitmapAsync ( IRandomAccessStream originalImage, Point startPoint, Size cropSize, double scale ) : Task
originalImage IRandomAccessStream The original image.
startPoint Point The start point.
cropSize Windows.Foundation.Size Size of the corp.
scale double The scale.
return Task

Resize() public static method

Resizes the specified stream.
public static Resize ( IRandomAccessStream sourceStream, uint newWidth, uint newHeight ) : Task
sourceStream IRandomAccessStream The source stream to resize.
newWidth uint The width of the resized image.
newHeight uint The height of the resized image.
return Task

Rotate() public static method

Rotates the given stream.
public static Rotate ( IRandomAccessStream randomAccessStream, BitmapRotation rotation ) : Task
randomAccessStream IRandomAccessStream The random access stream.
rotation BitmapRotation The rotation.
return Task