OptrisOptrisDocumentation

Documentation/OTC SDK/Optris.Sdk — C# API referencev12.0

RecordingAttachments

public static class RecordingAttachments

One call that reads the files carried inside anything this SDK writes, whether it is a recording or a still image.

A convenience over RecordingFile and Snapshot, for the case where the file came from a folder listing and its kind is not known in advance. Prefer the typed opens when it is: they answer more than the attachments, and they do not have to guess from an extension.

RecordingAttachments: methods

public static IReadOnlyList<Attachment> Read(string path)

Read every file carried inside a recording or a snapshot.

  • path: An .mkv, .png, .tif or .tiff written by this SDK. The extension decides which reader is used, because the two containers have nothing in common but what they carry.

Returns: The files, names and bytes together, in container order. Attachment.Compress is false on everything returned from a recording: an MKV attachment stream is stored verbatim, so nothing was deflated on the way in.

  • Throws ArgumentException: path is null or empty, or its extension is not one this SDK writes. A .csv snapshot is write-only and carries nothing to read back.
  • Throws OptrisSdkException: The file cannot be read.