Эх сурвалжийг харах

update VidUsImageData getImage

gavin.chen 2 жил өмнө
parent
commit
bcc5ea057a

+ 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);