C# Class Edi.UWP.Helpers.Extensions.BitmapExtensions

ファイルを表示 Open project: EdiWang/UWP-Helpers

Public Methods

Method Description
LoadWriteableBitmap ( string relativePath ) : Task

Return WriteableBitmap object from a given path

SaveStorageFile ( this bitmap, StorageFile file ) : Task

Save a bitmap to a StorageFile object

SaveToPngImage ( this bitmap, PickerLocationId location, string fileName ) : Task

Save a bitmap to a PNG file

ToByteArray ( this bitmap ) : byte[]

Return byte array of a bitmap object

ToStream ( this bitmap ) : Stream

Convert bitmap object to Stream

Private Methods

Method Description
WriteToStorageFile ( WriteableBitmap bitmap, StorageFile file ) : Task

Method Details

LoadWriteableBitmap() public static method

Return WriteableBitmap object from a given path
public static LoadWriteableBitmap ( string relativePath ) : Task
relativePath string file path
return Task

SaveStorageFile() public static method

Save a bitmap to a StorageFile object
public static SaveStorageFile ( this bitmap, StorageFile file ) : Task
bitmap this bitmap
file Windows.Storage.StorageFile StorageFile object
return Task

SaveToPngImage() public static method

Save a bitmap to a PNG file
public static SaveToPngImage ( this bitmap, PickerLocationId location, string fileName ) : Task
bitmap this bitmap
location PickerLocationId path
fileName string file name
return Task

ToByteArray() public static method

Return byte array of a bitmap object
public static ToByteArray ( this bitmap ) : byte[]
bitmap this bitmap
return byte[]

ToStream() public static method

Convert bitmap object to Stream
public static ToStream ( this bitmap ) : Stream
bitmap this bitmap
return Stream