brownemint / Ti-Android-CameraView

MIT License
23 stars 15 forks source link

aspect ratio #3

Open pilosof opened 9 years ago

pilosof commented 9 years ago

trying to use as a square camera, the preview aspect ratio gets skewed, any quick fix / hack to solve this ?

orangemechanic commented 9 years ago

I confirm the issue as well on Galaxy SII

brownemint commented 9 years ago

This is actually expected behaviour. The feed from the camera is mapped directly into the area of the view. So, if aspect ratios don't match, the feed gets skewed.

To use as a square camera, for instance, have the camera view fill the screen, then layer views over it to block out regions you don't want seen. The resulting image will be at the closest aspect ratio of the screen, so you need to use something like ti.imagefactory to crop the image.