瀏覽代碼

update VidUsImageData getImage

gavin.chen 2 年之前
父節點
當前提交
bcc5ea057a
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      lib/us/vid_us_image_data.dart

+ 3 - 0
lib/us/vid_us_image_data.dart

@@ -130,6 +130,9 @@ class VidUsImageData {
     if (index >= _imageCount || index < 0) {
       throw Exception("Can not find image Data");
     }
+    if (index < _imagesList.length) {
+      return _imagesList[index];
+    }
     //Jump to image.
     var imageData = _reader.readBytes(_imagePositionList[index]);
     return VidUsImage.fromBytes(imageData);