File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 11<!DOCTYPE HTML>
22<!--
33/*
4- * JavaScript Load Image Demo 1.6
4+ * JavaScript Load Image Demo 1.6.1
55 * https://github.com/blueimp/JavaScript-Load-Image
66 *
77 * Copyright 2011, Sebastian Tschan
@@ -109,8 +109,17 @@ <h2>Result</h2>
109109 ( slice && slice . call ( file , 0 , 131072 ) ) || file ,
110110 function ( e ) {
111111 var exif = new ExifReader ( ) ;
112- exif . load ( e . target . result ) ;
113- options . orientation = exif . getTagValue ( 'Orientation' ) ;
112+ try {
113+ exif . load ( e . target . result ) ;
114+ if ( window . console && console . info ) {
115+ console . info ( 'EXIF Reader' , exif . getAllTags ( ) ) ;
116+ }
117+ options . orientation = exif . getTagValue ( 'Orientation' ) ;
118+ } catch ( e ) {
119+ if ( window . console && console . error ) {
120+ console . error ( 'EXIF Reader' , e ) ;
121+ }
122+ }
114123 displayFile ( file , options ) ;
115124 } ,
116125 'readAsArrayBuffer'
You can’t perform that action at this time.
0 commit comments