Class BimxDocument
- Namespace
- PlaIO
- Assembly
- PlaIO.dll
An open .bimx file: the BIMx signature followed by a PNG cover image. What follows the cover is not
documented and is not interpreted.
public sealed class BimxDocument : IDisposableInheritance
Implements
Inherited Members
Properties
ContentOffset
File offset of the content after the cover; not interpreted.
public long ContentOffset { get; }Property Value
CoverLength
Length of the cover image, from the PNG signature through the IEND chunk and its CRC.
public long CoverLength { get; }Property Value
CoverOffset
File offset of the PNG cover image: 4, right after the signature.
public long CoverOffset { get; }Property Value
Length
Length of the file in bytes.
public long Length { get; }Property Value
Methods
Dispose()
Releases the stream unless the document was opened with leaveOpen.
public void Dispose()Open(string)
Opens the file at path for reading.
public static BimxDocument Open(string path)Parameters
pathstring
Returns
Exceptions
- InvalidDataException
-
The file is not a .bimx file or its cover image is cut short.
Open(Stream, bool)
Opens a .bimx file from a readable, seekable stream and measures the cover image without reading it. The
document owns the stream unless leaveOpen is true; when this method throws, the stream stays with
the caller.
public static BimxDocument Open(Stream stream, bool leaveOpen = false)Parameters
Returns
Exceptions
- ArgumentException
-
The stream cannot read or seek.
- InvalidDataException
-
The data is not a .bimx file or its cover image is cut short.
ReadCover()
The PNG cover image.
public byte[] ReadCover()Returns
- byte[]
Exceptions
- InvalidDataException
-
The cover is larger than this reader reads into memory (64 MiB).