On iOS, how do I resize a very large image on the client side in a web app?

573 Views Asked by At

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?

1

There are 1 best solutions below

0
On

I did find the Megapixel library that seems to correct this issue, though the documentation isn't clear that is it's purpose.

https://github.com/stomita/ios-imagefile-megapixel