Browse Source

update VidUsImageData getImage

gavin.chen 2 years ago
parent
commit
bcc5ea057a
1 changed files with 3 additions and 0 deletions
  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);