Saves the Image to a byte array.
Namespace: ImageSenseAssembly: ImageSense (in ImageSense.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C# |
---|
public static byte[] ToByteArray( this Image image ) |
Visual Basic |
---|
<ExtensionAttribute> _ Public Shared Function ToByteArray ( _ image As Image _ ) As Byte() |
Visual C++ |
---|
[ExtensionAttribute] public: static array<unsigned char>^ ToByteArray( Image^ image ) |
Parameters
- image
- Type: System.Drawing..::..Image
The Image to output as bytes.
Return Value
A byte array representing the given Image.Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Image. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Remarks
When calling this method, if the framework cannot find a formatter for the image's
RawFormat, an exception will be thrown.