bigflood / dartexif

Dart package to decode Exif data from tiff, jpeg and heic files
https://pub.dev/packages/exif
MIT License
30 stars 29 forks source link

Cause RangeError for some images #7

Closed ttlg closed 5 years ago

ttlg commented 5 years ago

Hi, Thank you for making the package. I noticed that readExifFromBytes causes RangeError for some images. I am not sure which image cause that. But the image which caused the error was the image cropped by the smart phone application.

E/flutter (23641): [ERROR:flutter/shell/common/shell.cc(184)] Dart Error: Unhandled exception: E/flutter (23641): RangeError (start): Invalid value: Only valid value is 0: 8 E/flutter (23641): #0 RangeError.checkValidRange (dart:core/errors.dart:327:7) E/flutter (23641): #1 List.sublist (dart:core/runtime/libgrowable_array.dart:81:22) E/flutter (23641): #2 make_string_uc (package:exif/src/util.dart:31:13) E/flutter (23641): #3 ExifHeader.dump_ifd (package:exif/src/exifheader.dart:350:35) E/flutter (23641): #4 readExifFromFileReader (package:exif/src/read_exif.dart:241:9) E/flutter (23641): #5 readExifFromBytes (package:exif/src/read_exif.dart:22:17)

bigflood commented 5 years ago

It will be helpful if you give me that image.

ttlg commented 5 years ago

I uploaded the image on AmazonPhotos. You can download it from the link: https://www.amazon.co.jp/photos/share/q55y33KD43fDZTAXHmutArVO1BV6A9NSQw8CqrcCVvd