David PHAM-VAN

Fix exif orientation crash

... ... @@ -6,6 +6,7 @@
- Add curved LineDataSet Chart
- Fix PdfColors.fromHex()
- Update Barcode library to 1.9.0
- Fix exif orientation crash
## 1.7.1
... ...
... ... @@ -96,10 +96,17 @@ class PdfJpegInfo {
? null
: utf8.decode(tags[PdfExifTag.FlashpixVersion]);
PdfImageOrientation get orientation =>
tags == null || tags[PdfExifTag.Orientation] == null
? PdfImageOrientation.topLeft
: PdfImageOrientation.values[tags[PdfExifTag.Orientation] - 1];
PdfImageOrientation get orientation {
if (tags == null || tags[PdfExifTag.Orientation] == null) {
return PdfImageOrientation.topLeft;
}
try {
return PdfImageOrientation.values[tags[PdfExifTag.Orientation] - 1];
} on RangeError {
return PdfImageOrientation.topLeft;
}
}
double get xResolution => tags == null || tags[PdfExifTag.XResolution] == null
? null
... ...