Javascript-localresizeimg.js 90 degrees to upload pictures under the iphone, how to solve

Source: Internet
Author: User
Keywords Php javascript
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)); }
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.