开发者

Capturing image from Camera in Android and then cropping

For an application I'm looking to write, I'm looking for the ability to capture an image from within my application using an onboard camera on an android device(which I've find documentation on, I don't need help with this) and the开发者_如何学运维n after the image is taken allow the user to crop an area of the image for the program to then analyze(rectangular area is being analyzed). Is there something built in to android that will let me overlay some sort of grid for the user to align the image while taking it, then after that is finished allow them to use the crop (like the feature built into the camera application) natively inside my app? I was unable to find anything on adjustable cropping built into applications so sorry if this was answered before.


I haven't had alot of experience with Android but take a look at this StackOverFlow Cropping

Edit: If that doesnt help type this "How to crop an image in Andriod" into google, Tons of tutorials

Edit: Ok so what you are asking does not have any tutorials right now on the internet but use this User TouchEvents and the resource you have right now to combine the two.

For your steps I consider do this

1) Get users touch position
*easiest way is to just make it get the positions when they have two fingers on the screen
2) draw lines from each position to create a box
3) When they press ok give those positions to the crop method as arguments and crop it

Hope this helps


This is a nice working tutorial: http://mobile.tutsplus.com/tutorials/android/capture-and-crop-an-image-with-the-device-camera/


Download this tutorial source code i hope it will help you lot. crop image from camera or from SD card

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜