Four years later, I would like to konw if you have found a good way to show 
a cropped camera preview? I am struggling with this for a couple of days.

On Wednesday, May 20, 2009 10:29:07 PM UTC+3, Max Salley wrote:
>
> I'm working on an app that requires the user to be able to read some 
> text that's in the camera's preview images.  The camera has plenty of 
> resolution for the range I'm looking at, but when it's shrunk down to 
> fit on the phone's display it's completely unusable.  What I want to 
> do is just display a subset of the preview images, but display them at 
> the native resolution of the image, rather than the scaled down 
> image.  I tried Camera.Parameters.setPreviewSize, but it seems to have 
> no effect (giving it (1, 1) is the same as giving it (1000000, 
> 1000000), which is the same as some rational value).  I also tried 
> capturing the image using Camera.PreviewCallback.onPreviewFrame 
> andconverting it to a bitmap then using a canvas from a SurfaceView to 
> display a portion of the bitmap, but the SDK has no way to convert 
> from the camera's format to bitmap, and it seems that doing such 
> things in the preview callback is unworkably expensive.  How should I 
> draw a subpicture at native resolution rather than the entire image 
> scaled to fit the phone's screen? 
>
> Thanks 
> - Max

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to