移动Safari图片上传和放大器;它们的大小 [英] mobile safari image upload & their sizes
问题描述
好了,所以尽可能多的知识,野生动物园移动现在允许文件上传,通过相机或图像库。
Ok so as many of know, safari mobile now allows file uploads through camera or image library.
的'问题'是,当图像从相机拍摄的,它被发送,因为它是,这意味着它是在内存非常沉重的(我认为这是大约2或3甚至在iPhone 4 MB)。
The 'problem' is that when the picture is taken from the camera, it is sent as it is, meaning it is very heavy in memory (I think it's around 2 or 3 mb even on iphone 4).
这使得上传很慢,也消耗带宽(移动不好)。你知道,用<文件/>
HTML标签,还有一个办法说的iOS:哎,你能不能也COM preSS的图片几分? - 就像当所述图像经由电子邮件发送应用程序它正在做
This makes the upload really slow and also bandwidth consuming (not good for mobile). Do you know if, with the <file />
html tag, there is a way to say to iOS: "hey, can you also compress the picture a bit?" - like it's being done when said images are sent via the mail app.
先谢谢了。
推荐答案
有对一个库:<一href=\"https://github.com/gokercebeci/canvasResize\">https://github.com/gokercebeci/canvasResize
它的工作原理是把图像到&LT;帆布/&GT;
(比原图像更小),则获得的图像数据,所以你可以将它发布到你的服务器
It works by putting the image to a <canvas />
(smaller than original image), then getting the image data so you can post it to your server.
这篇关于移动Safari图片上传和放大器;它们的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!