Localresizeimg.js 90 degrees to upload pictures under the iphone, how to solve
Reply content:
Localresizeimg.js 90 degrees to upload pictures under the iphone, how to solve
This is going to be in this js
source to do picture rotation processing
var angle = '; This.on (' Change ', function () {var file = This.files[0]; var URL = window. URL | | Webkiturl; var blob = url.createobjecturl (file); var binaryajax = window. Binaryajax | | ", EXIF = window. EXIF | | ''; if (Binaryajax && EXIF) {//Get photo orientation and set angle binaryajax (blob, function (o ) {var oexif = Exif.readfrombinaryfile (o.binaryresponse), orientation = Oexif.orientati On Switch (orientation) {Case 6:angle = radians (' 90deg '); Break Case 3:angle = radians (' 180deg '); Break Case 8:angle = radians (' 270deg '); Break } }); }//Execute pre function if ($.isfunction (Obj.before)) {Obj.before (this, blob, file)}; _create (blob, file); This.value = "; Empty temporary data}); function radians (angle) {if (typeof angle = = ' number ') return angle; return {rad:function (z) {return z; }, Deg:function (z) {return math.pi/180 * z; }}[string (angle). Match (/[a-z]+$/) [0] | | ' Rad '] (parsefloat (angle)); }