C# Class ToolStackPNGWriterLib.PNGWriter

WriteableBitmap Extensions for PNG Writing
Datei anzeigen Open project: Catrobat/CatrobatForWindows Class Usage Examples

Public Methods

Method Description
DetectWBByteOrder ( ) : void

Detects the color order of a stored byte array. Byte order may change between platforms, you should call this once before writting a PNG or if you have any issues with colors changing.

WritePNG ( WriteableBitmap image, System stream ) : System.Threading.Tasks.Task

Write and PNG file out to a file stream. Currently compression is not supported.

WritePNG ( WriteableBitmap image, System stream, int compression ) : System.Threading.Tasks.Task

Write and PNG file out to a file stream. Currently compression is not supported.

Private Methods

Method Description
WriteChunk ( string type, byte data ) : System.Threading.Tasks.Task
WriteChunk ( string type, byte data, int offset, int length ) : System.Threading.Tasks.Task
WriteDataChunks ( int compression ) : System.Threading.Tasks.Task
WriteDataChunksUncompressed ( ) : System.Threading.Tasks.Task
WriteEndChunk ( ) : System.Threading.Tasks.Task
WriteGammaChunk ( ) : System.Threading.Tasks.Task
WriteHeaderChunk ( PngHeader header ) : System.Threading.Tasks.Task
WriteInteger ( Stream stream, int value ) : System.Threading.Tasks.Task
WriteInteger ( Stream stream, uint value ) : System.Threading.Tasks.Task
WriteInteger ( byte data, int offset, int value ) : void
WritePhysicsChunk ( ) : System.Threading.Tasks.Task

Method Details

DetectWBByteOrder() public static method

Detects the color order of a stored byte array. Byte order may change between platforms, you should call this once before writting a PNG or if you have any issues with colors changing.
public static DetectWBByteOrder ( ) : void
return void

WritePNG() public static method

Write and PNG file out to a file stream. Currently compression is not supported.
public static WritePNG ( WriteableBitmap image, System stream ) : System.Threading.Tasks.Task
image Windows.UI.Xaml.Media.Imaging.WriteableBitmap The WriteableBitmap to work on.
stream System The destination file stream.
return System.Threading.Tasks.Task

WritePNG() public static method

Write and PNG file out to a file stream. Currently compression is not supported.
public static WritePNG ( WriteableBitmap image, System stream, int compression ) : System.Threading.Tasks.Task
image Windows.UI.Xaml.Media.Imaging.WriteableBitmap The WriteableBitmap to work on.
stream System The destination file stream.
compression int Level of compression to use (-1=auto, 0=none, 1-100 is percentage).
return System.Threading.Tasks.Task