Method SaveToStream
- Namespace
- PaintDotNet
- Assembly
- PaintDotNet.Data.dll
SaveToStream(Stream)
Saves the Document to the given Stream with only the default headers and no IO completion callback.
public void SaveToStream(Stream stream)
Parameters
stream
StreamThe Stream to serialize the Document to.
SaveToStream(Stream, IOEventHandler?)
Saves the Document to the given Stream with the default and given headers, and using the given IO completion callback.
public void SaveToStream(Stream output, IOEventHandler? callback)
Parameters
output
StreamThe Stream to serialize the Document to.
callback
IOEventHandlerThis can be used to keep track of the number of uncompressed bytes that are written. The values reported through the IOEventArgs.Count+Offset will vary from 1 to approximately Layers.CountWidthHeight*sizeof(ColorBgra). The final number will actually be higher because of hierarchical overhead, so make sure to cap any progress reports to 100%. This callback will be wired to the IOFinished event of a SiphonStream. Events may be raised from any thread. May be null.