Showing
2 changed files
with
5 additions
and
0 deletions
| @@ -13,6 +13,7 @@ | @@ -13,6 +13,7 @@ | ||
| 13 | - Fix Text decoration placements | 13 | - Fix Text decoration placements |
| 14 | - Improve image buffer management | 14 | - Improve image buffer management |
| 15 | - Optimize memory footprint | 15 | - Optimize memory footprint |
| 16 | +- Add an exception if a jpeg image is not a supported format | ||
| 16 | 17 | ||
| 17 | ## 1.5.0 | 18 | ## 1.5.0 |
| 18 | 19 |
| @@ -64,6 +64,10 @@ class PdfJpegInfo { | @@ -64,6 +64,10 @@ class PdfJpegInfo { | ||
| 64 | offset += len - 2; | 64 | offset += len - 2; |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | + if (height == null) { | ||
| 68 | + throw 'Unable to find a Jpeg image in the file'; | ||
| 69 | + } | ||
| 70 | + | ||
| 67 | final Map<PdfExifTag, dynamic> tags = _findExifInJpeg(buffer); | 71 | final Map<PdfExifTag, dynamic> tags = _findExifInJpeg(buffer); |
| 68 | 72 | ||
| 69 | return PdfJpegInfo._(width, height, color, tags); | 73 | return PdfJpegInfo._(width, height, color, tags); |
-
Please register or login to post a comment