1234567891011121314151617181920212223242526272829303132333435 |
- namespace fis.Vid
- {
- class VidDisplayEngine:IDisplayEngine
- {
- private readonly VinnoImageData _imageData;
- public int ImageCount { get; }
- public byte[] BasicData { get; }
- public byte[] ExtendedData { get; }
- public VidDisplayEngine(string filePath)
- {
- _imageData = new VinnoImageData(filePath, OperationMode.Open);
- ImageCount = _imageData.ImageCount;
- BasicData = _imageData.Probe?.ToBytes();
- ExtendedData = _imageData.ExtendedData;
- }
- public void Close()
- {
- _imageData.Dispose();
- }
- public byte[] GetImageData(int index)
- {
- var vinnoImage = _imageData.GetImage(index);
- if (vinnoImage != null)
- {
- return vinnoImage.ToBytes();
- }
- return new byte[0];
- }
- }
- }
|