C# Class Cimbalino.Phone.Toolkit.Extensions.WriteableBitmapExtensions

Provides a set of static (Shared in Visual Basic) methods for WriteableBitmap instances.
Afficher le fichier Open project: Cimbalino/Cimbalino-Phone-Toolkit

Méthodes publiques

Méthode Description
SaveJpeg ( this writeableBitmap, Stream outputStream, int quality ) : void

Encodes a WriteableBitmap object into a JPEG stream, with parameters for setting the target quality of the JPEG file.

SaveJpeg ( this writeableBitmap, Stream outputStream, int targetWidth, int targetHeight, int quality ) : void

Encodes a WriteableBitmap object into a JPEG stream, with parameters for setting the target width, height, and quality of the JPEG file.

SaveJpegAsync ( this writeableBitmap, Stream outputStream, int quality ) : System.Threading.Tasks.Task

Encodes a WriteableBitmap object into a JPEG stream, with parameters for setting the target quality of the JPEG file.

SaveJpegAsync ( this writeableBitmap, Stream outputStream, int targetWidth, int targetHeight, int quality ) : System.Threading.Tasks.Task

Encodes a WriteableBitmap object into a JPEG stream, with parameters for setting the target width, height, and quality of the JPEG file.

SaveJpegAsync ( this writeableBitmap, Stream outputStream, int targetWidth, int targetHeight, int orientation, int quality ) : System.Threading.Tasks.Task

Encodes a WriteableBitmap object into a JPEG stream, with parameters for setting the target width, height, orientation, and quality of the JPEG file.

SavePng ( this writeableBitmap, Stream outputStream ) : void

Encodes a WriteableBitmap object into a PNG stream.

SavePng ( this writeableBitmap, Stream outputStream, CompressionLevel compressionLevel ) : void

Encodes a WriteableBitmap object into a PNG stream, using the specified output compression.

SavePng ( this writeableBitmap, Stream outputStream, WriteableBitmapSavePngParameters parameters ) : void

Encodes a WriteableBitmap object into a PNG stream, using the specified output WriteableBitmapSavePngParameters.

SavePngAsync ( this writeableBitmap, Stream outputStream ) : System.Threading.Tasks.Task

Encodes a WriteableBitmap object into a PNG stream.

SavePngAsync ( this writeableBitmap, Stream outputStream, CompressionLevel compressionLevel ) : System.Threading.Tasks.Task

Encodes a WriteableBitmap object into a PNG stream, using the specified output compression.

SavePngAsync ( this writeableBitmap, Stream outputStream, WriteableBitmapSavePngParameters parameters ) : System.Threading.Tasks.Task

Encodes a WriteableBitmap object into a PNG stream, using the specified output WriteableBitmapSavePngParameters.

Private Methods

Méthode Description
CreateChunk ( ) : byte[]
CreateChunkFromInt ( int value ) : byte[]
CreateChunkFromString ( string value ) : byte[]
CreateChunkFromUint ( uint value ) : byte[]
WriteChunk ( Stream outputStream, string type, byte data ) : void
WriteDataChunks ( Stream outputStream, System.Windows.Media.Imaging.WriteableBitmap writeableBitmap, WriteableBitmapSavePngParameters parameters ) : void
WriteFooter ( Stream outputStream ) : void
WriteGamma ( Stream outputStream, WriteableBitmapSavePngParameters parameters ) : void
WriteHeader ( Stream outputStream, System.Windows.Media.Imaging.WriteableBitmap writeableBitmap ) : void
WritePhysics ( Stream outputStream, WriteableBitmapSavePngParameters parameters ) : void

Method Details

SaveJpeg() public static méthode

Encodes a WriteableBitmap object into a JPEG stream, with parameters for setting the target quality of the JPEG file.
public static SaveJpeg ( this writeableBitmap, Stream outputStream, int quality ) : void
writeableBitmap this The WriteableBitmap object.
outputStream Stream The image data stream.
quality int This parameter represents the quality of the JPEG photo with a range between 0 and 100, with 100 being the best photo quality. We recommend that you do not fall lower than a value of 70. because JPEG picture quality diminishes significantly below that level.
Résultat void

SaveJpeg() public static méthode

Encodes a WriteableBitmap object into a JPEG stream, with parameters for setting the target width, height, and quality of the JPEG file.
public static SaveJpeg ( this writeableBitmap, Stream outputStream, int targetWidth, int targetHeight, int quality ) : void
writeableBitmap this The WriteableBitmap object.
outputStream Stream The image data stream.
targetWidth int The target width of the file.
targetHeight int The target height of the file.
quality int This parameter represents the quality of the JPEG photo with a range between 0 and 100, with 100 being the best photo quality. We recommend that you do not fall lower than a value of 70. because JPEG picture quality diminishes significantly below that level.
Résultat void

SaveJpegAsync() public static méthode

Encodes a WriteableBitmap object into a JPEG stream, with parameters for setting the target quality of the JPEG file.
public static SaveJpegAsync ( this writeableBitmap, Stream outputStream, int quality ) : System.Threading.Tasks.Task
writeableBitmap this The WriteableBitmap object.
outputStream Stream The image data stream.
quality int This parameter represents the quality of the JPEG photo with a range between 0 and 100, with 100 being the best photo quality. We recommend that you do not fall lower than a value of 70. because JPEG picture quality diminishes significantly below that level.
Résultat System.Threading.Tasks.Task

SaveJpegAsync() public static méthode

Encodes a WriteableBitmap object into a JPEG stream, with parameters for setting the target width, height, and quality of the JPEG file.
public static SaveJpegAsync ( this writeableBitmap, Stream outputStream, int targetWidth, int targetHeight, int quality ) : System.Threading.Tasks.Task
writeableBitmap this The WriteableBitmap object.
outputStream Stream The image data stream.
targetWidth int The target width of the file.
targetHeight int The target height of the file.
quality int This parameter represents the quality of the JPEG photo with a range between 0 and 100, with 100 being the best photo quality. We recommend that you do not fall lower than a value of 70. because JPEG picture quality diminishes significantly below that level.
Résultat System.Threading.Tasks.Task

SaveJpegAsync() public static méthode

Encodes a WriteableBitmap object into a JPEG stream, with parameters for setting the target width, height, orientation, and quality of the JPEG file.
public static SaveJpegAsync ( this writeableBitmap, Stream outputStream, int targetWidth, int targetHeight, int orientation, int quality ) : System.Threading.Tasks.Task
writeableBitmap this The WriteableBitmap object.
outputStream Stream The image data stream.
targetWidth int The target width of the file.
targetHeight int The target height of the file.
orientation int This parameter is not currently used by this method. Use a value of 0 as a placeholder.
quality int This parameter represents the quality of the JPEG photo with a range between 0 and 100, with 100 being the best photo quality. We recommend that you do not fall lower than a value of 70. because JPEG picture quality diminishes significantly below that level.
Résultat System.Threading.Tasks.Task

SavePng() public static méthode

Encodes a WriteableBitmap object into a PNG stream.
public static SavePng ( this writeableBitmap, Stream outputStream ) : void
writeableBitmap this The writeable bitmap.
outputStream Stream The image data stream.
Résultat void

SavePng() public static méthode

Encodes a WriteableBitmap object into a PNG stream, using the specified output compression.
public static SavePng ( this writeableBitmap, Stream outputStream, CompressionLevel compressionLevel ) : void
writeableBitmap this The writeable bitmap.
outputStream Stream The image data stream.
compressionLevel CompressionLevel The image compression level.
Résultat void

SavePng() public static méthode

Encodes a WriteableBitmap object into a PNG stream, using the specified output WriteableBitmapSavePngParameters.
public static SavePng ( this writeableBitmap, Stream outputStream, WriteableBitmapSavePngParameters parameters ) : void
writeableBitmap this The writeable bitmap.
outputStream Stream The image data stream.
parameters WriteableBitmapSavePngParameters The image save parameters.
Résultat void

SavePngAsync() public static méthode

Encodes a WriteableBitmap object into a PNG stream.
public static SavePngAsync ( this writeableBitmap, Stream outputStream ) : System.Threading.Tasks.Task
writeableBitmap this The writeable bitmap.
outputStream Stream The image data stream.
Résultat System.Threading.Tasks.Task

SavePngAsync() public static méthode

Encodes a WriteableBitmap object into a PNG stream, using the specified output compression.
public static SavePngAsync ( this writeableBitmap, Stream outputStream, CompressionLevel compressionLevel ) : System.Threading.Tasks.Task
writeableBitmap this The writeable bitmap.
outputStream Stream The image data stream.
compressionLevel CompressionLevel The image compression level.
Résultat System.Threading.Tasks.Task

SavePngAsync() public static méthode

Encodes a WriteableBitmap object into a PNG stream, using the specified output WriteableBitmapSavePngParameters.
public static SavePngAsync ( this writeableBitmap, Stream outputStream, WriteableBitmapSavePngParameters parameters ) : System.Threading.Tasks.Task
writeableBitmap this The writeable bitmap.
outputStream Stream The image data stream.
parameters WriteableBitmapSavePngParameters The image save parameters.
Résultat System.Threading.Tasks.Task