Using JavaScript and HTML5, you can take a Image
class and draw it on a canvas
, then redraw it pixel by pixel smaller to another canvas
. But if the image is too large, it will fail. By large, I mean 3500x2500
or 3.5mb
for the iPhone 4s through iPhone 6+
Unfortunately, the camera on the iPhone is taking images much larger than what appears to be resizable on the client. I cannot resize on the server, due to data constraints. Do I have any options?
I did find the Megapixel library that seems to correct this issue, though the documentation isn't clear that is it's purpose.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.