I am doing a simple application using Camera android and noticed that when a take a picture, the preview camera image is a little smaller than the final picture. What am I doing wrong?
attached example images from the app:
Related
If i want to take an image from Camera application,it is giving the small Image,If i access from gallery,it gives me enlarged image,Is there anyway to get the enlarged Image of camera .
I have created a custom camera activity (pretty much followed the Android tutorial)
I implemented a SurfaceView to use a preview and an ImageView to display the image taken on OnPictureTaken
Picture taken takes a while to show up and differs from the preview in terms of aspect ratio, size, lighting, white balance. (probably I didn't set the params properly). The quality of the picture doesn't really matter to me. I just want the app to be responsive, ie still picture shows up immediately, and is identical to the preview.
So what I ended up doing was remove the ImageView and only have the SurfaceView. When the camera button is clicked, I stopPreview(). However, now I don't know how to save the SurfaceView content to bitmap/file. From what I read there isn't really a way to SurfaceView to return a bitmap.
What would be a better way to implement the camera? To reiterate, I need to be able to get a bitmap that is identical to the preview, and have that still image shown to the user immediately.
I am using the CWAC camera library in my application. I tried this and this is working fine showing the camera preview in the relevent Fregment.
Now all I want to past a picture on that camera preview and whenever I click button to take picture it should take picture with that image. I want image in forground and the camera preview in background of it . So is there any way to do that . Here is the sample code that I am using to take picture
This has nothing to do with the CWAC-Camera library. If you want to merge multiple image files together, you are welcome to do so, but you would do that after taking the picture.
I have used the Commonsware-cwac library exactly like the demo app. After resizing the framelayout which the preview is contained in I achieve a squared preview that maintains correct ratio and preview size. However, after I capture I would like to get a a photo with the same size as the preview. Now, when I capture a new photo, the saved photo is much bigger due to the fact that it captures the original and non-squared preview.
How can the output photo capture the same as the preview and no more?
Option #1: You let the library save the image as it does today, then crop the image yourself
Option #2: You fork the library and add in some sort of cropping logic as part of ImageCleanupTask
Is it possible to take a thumbnail photo using the camera? I see methods like getJpegThumbnailQuality but I don't see anything for taking the actual thumbnail. I must do this using the Camera API and not using an Intent.
By any means, Camera itself will not directly produce a Bitmap of thumbnail size. Most devices have limited set of picture resolutions for camera. However you can create another scaled down bitmap from the picture camera provides you.