BitmapDataExtensionsSave Method

KGy SOFT Drawing Libraries Help
Saves the content of this bitmapData into the specified stream.
See the Remarks section for details.

Namespace:  KGySoft.Drawing.Imaging
Assembly:  KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 6.2.0
Syntax

public static void Save(
	this IReadableBitmapData bitmapData,
	Stream stream
)

Parameters

bitmapData
Type: KGySoft.Drawing.ImagingIReadableBitmapData
The IReadableBitmapData to save.
stream
Type: System.IOStream
The stream to save the bitmap data into.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IReadableBitmapData. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks

Note Note
This method blocks the caller, and does not support cancellation or reporting progress. Use the BeginSave or SaveAsync (in .NET Framework 4.0 and above) methods for asynchronous call and to set up cancellation or for reporting progress.

To reload the content use the BitmapDataFactory.Load method.

The saved content always preserves PixelFormat so the BitmapDataFactory.Load method can restore it the same way on any platform.

Note Note
If bitmapData represents the bitmap data of a native Bitmap with Format48bppRgb, Format64bppArgb or Format64bppPArgb PixelFormat, then on Windows the actual color depth is quantized to 32bpp because these formats have a different raw interpretation than managed bitmaps used by KGySoft Drawing Libraries.
See Also

Reference