4

We are using Canvas to resize images on Iphone/IPAD before uploading to our server.

On IPhone 4S and 5, when photos are taken in landscape mode with FRONT camera, the resizing works fine. When taken in portrait mode, the images are squashed by about 1/4. But when taken with rear camera, all images, both landscape and portrait, are squashed by about 7/8, leaving just a thin belt to view.

On IPAD and IPOD, it is the same for front and rear camera: landscape images are fine, but portrait images are squashed by 1/4.

We tried several different resizing algorithms, but ended up with the same results.

Any ideas how to solve this problem?

Zhuowei Lei
  • 41
  • 1
  • 2

2 Answers2

0

I found a working solution for this. gokercebeci posted a great jQuery plugin on github. It is working as expected for my app!

ShadeTreeDeveloper
  • 1,553
  • 2
  • 12
  • 20
0

Found a solution that works for me at HTML5 Canvas drawImage ratio bug iOS . The solution is accredited to stomita and posted and edited (I believe) by tombre and matt burns on 14 Jan 2014.

Community
  • 1
  • 1
NK Lee
  • 1