BitmapDataExtensionsSave Method
Saves the content of this bitmapData into the specified stream.
Namespace: KGySoft.Drawing.ImagingAssembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 8.2.0
public static void Save(
this IReadableBitmapData bitmapData,
Stream stream
)
<ExtensionAttribute>
Public Shared Sub Save (
bitmapData As IReadableBitmapData,
stream As Stream
)
public:
[ExtensionAttribute]
static void Save(
IReadableBitmapData^ bitmapData,
Stream^ stream
)
[<ExtensionAttribute>]
static member Save :
bitmapData : IReadableBitmapData *
stream : Stream -> unit
- bitmapData IReadableBitmapData
- The IReadableBitmapData to save.
- stream Stream
- The stream to save the bitmap data into.
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).
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 known KnownPixelFormats so the BitmapDataFactory.Load
method can restore it the same way on any platform. Custom pixel formats are saved by a compatible known pixel format.