-api-id | -api-type | -api-device-family-note |
---|---|---|
M:Windows.UI.Input.Inking.InkManager.SaveAsync(Windows.Storage.Streams.IOutputStream) |
winrt method |
xbox |
Note
For Universal Windows app using Extensible Application Markup Language (XAML), we recommend using InkPresenter and the InkCanvas control instead of InkManager.
Asynchronously saves all InkStroke objects in the InkStroke collection that is managed by the InkManager to the specified stream.
Ink data is serialized as Ink Serialized Format (ISF) metadata and embedded into a Graphics Interchange Format (GIF) file.
The target stream. An IRandomAccessStream (requires IOutputStream) object can be specified instead.
The size of the saved stream and the status of the asynchronous operation as the number of bytes sent. For more information, see WriteAsync method.
Embedding the metadata into a Graphics Interchange Format (GIF) file enables ink to be viewed in applications that are not ink-enabled while maintaining full fidelity for ink-enabled applications. This format is ideal for transporting ink content within an HTML file and making it usable by both ink and non-ink applications.
Note
Ink Serialized Format (ISF) is the most compact persistent representation of ink. It can be embedded within a binary document format or placed directly on the Clipboard while preserving various ink properties such as pressure, width, color, tilt, twist, and so on.
The saveStrokes
function in this example demonstrates how to:
- Display a file save screen where the file type is constrained to Graphics Interchange Format (GIF) format using the FileSavePicker object.
- Set up an output stream through the OpenAsync method.
- Use the SaveAsync method of an InkManager object (
inkManager
) to serialize the ink data to an output stream and embed it into a Graphics Interchange Format (GIF) file (storageFile
).
[!code-jsSaveStrokes]
Pen and stylus interactions, Get started: Support ink in your UWP app, Ink analysis sample (basic) (C#), Ink handwriting recognition sample (C#), Save and load ink strokes from an Ink Serialized Format (ISF) file, Save and load ink strokes from the clipboard, Ink toolbar location and orientation sample (basic), Ink toolbar location and orientation sample (dynamic), Coloring book sample, Family notes sample, Inking sample (JavaScript), Simple inking sample (C#/C++), Complex inking sample (C++), Ink analysis sample