File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 145
145
0 ,
146
146
sw ,
147
147
sh ,
148
- Math . floor ( sx * width / iw ) ,
149
- Math . floor ( sy * height / ih / vertSquashRatio ) ,
148
+ ( sx * width / iw ) << 0 ,
149
+ ( sy * height / ih / vertSquashRatio ) << 0 ,
150
150
Math . ceil ( sw * width / iw ) ,
151
151
Math . ceil ( sh * height / ih / vertSquashRatio )
152
152
) ;
173
173
( options . minHeight || height ) / height
174
174
) ;
175
175
if ( scale > 1 ) {
176
- width = parseInt ( width * scale , 10 ) ;
177
- height = parseInt ( height * scale , 10 ) ;
176
+ width = ( width * scale ) << 0 ;
177
+ height = ( height * scale ) << 0 ;
178
178
}
179
179
scale = Math . min (
180
180
( options . maxWidth || width ) / width ,
181
181
( options . maxHeight || height ) / height
182
182
) ;
183
183
if ( scale < 1 ) {
184
- width = parseInt ( width * scale , 10 ) ;
185
- height = parseInt ( height * scale , 10 ) ;
184
+ width = ( width * scale ) << 0 ;
185
+ height = ( height * scale ) << 0 ;
186
186
}
187
187
if ( img . getContext || ( options . canvas && canvas . getContext ) ) {
188
188
canvas . width = width ;
You can’t perform that action at this time.
0 commit comments