File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -111,19 +111,18 @@ Exif orientation values to correctly display the letter F:
111111 )
112112 }
113113
114- // Transform image orientation based on
115- // the given EXIF orientation option:
114+ // Transform image orientation based on the given EXIF orientation option:
116115 loadImage . transformCoordinates = function ( canvas , options ) {
117116 originalTransformCoordinates . call ( loadImage , canvas , options )
117+ var orientation = options . orientation
118+ if ( ! ( orientation > 1 && orientation < 9 ) ) {
119+ return
120+ }
118121 var ctx = canvas . getContext ( '2d' )
119122 var width = canvas . width
120123 var height = canvas . height
121124 var styleWidth = canvas . style . width
122125 var styleHeight = canvas . style . height
123- var orientation = options . orientation
124- if ( ! ( orientation > 1 && orientation < 9 ) ) {
125- return
126- }
127126 if ( orientation > 4 ) {
128127 canvas . width = height
129128 canvas . height = width
You can’t perform that action at this time.
0 commit comments