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