blueimp / JavaScript-Load-Image

Load images provided as File or Blob objects or via URL. Retrieve an optionally scaled, cropped or rotated HTML img or canvas element. Use methods to parse image metadata to extract IPTC and Exif tags as well as embedded thumbnail images, to overwrite the Exif Orientation value and to restore the complete image header after resizing.
https://blueimp.github.io/JavaScript-Load-Image/
MIT License
4.45k stars 922 forks source link

Uncaught exceptions of transformations cause stale image loading #110

Closed AndyOGo closed 4 years ago

AndyOGo commented 4 years ago

This is a really neat library.

E.g. IE throws this error for huge images:

SCRIPT16389: Unspecified error.

I'm sure the reason is maximum size restrictions of <canvas />:

A try/catch around drawImage should handle thrown exceptions, like at this line: https://github.com/blueimp/JavaScript-Load-Image/blob/b14e2df0a0fbcbc5ac2a44d4e399709dd69ba9a4/js/load-image-scale.js#L106

Free high res images can be found here: https://effigis.com/en/solutions/satellite-images/satellite-image-samples/

load-image-ie-unspecified-error