Hello everybody,
I want a simple thing, I guess... Take a picture with a png as overlay, and save it. In both, Android and iPhone!
Which is the best way to do that?
What I found:
//app.js var cameraoverlay = Titanium.UI.createImageView({ width: '480dp', height: '320dp', top:0, image:'images/pig.png' }); Ti.Media.showCamera({ overlay: cameraoverlay });The camera is working and the image is showing over the camera, but in this case, the autofocus doesn't work and the controls to take a picture and change the camera to back or front doesn't show. (Android Galaxy Nexus)
PS: I want to merge the overlay (pig.png) with the picture!
I'm using the last version of SDK and Titanium!
Thanks!
2 Answers
set the touchEnabled to false for the cameraoverlay.
For merging images, see this thread
First, once you add an overlay, you are specifying the controls yourself, the overlay takes the place of the controls. So you can either do without the controls, or add the controls with your overlay. Second, to get the overlay with the image you can either take the photo, then composite the overlay onto the image in a new view, or you can try to just take a screenshot with the overlay up over the camera picture. Not sure if that second option will work or not, I've never tried it, but it sounds good in theory. The downside to that would be that you won't get full camera resolution out of your photo, you'll just get the screen resolution image.
Your Answer
Think you can help? Login to answer this question!