Anyone have any insight at all?  Was I not clear about my problem?

I am simply trying to zoom in or zoom out on the camera preview but I
am not using the Camera smooth zoom API in 2.2 since it seems to only
work for levels of zoom that are different for each phone/camera.
Also, it appears that it can not zoom using a floating point scale.

If I try scaling the FrameLayout around the preview SurfaceView it
looks like it kind of works, but the preview goes completely black
while the animation is running.

I am starting to think maybe this will work by grabbing each frame
from the preview and drawing to a canvas white scaling, but this seems
over-complicated compared to using the Animations API.

If someone can help point me in the right direction that would be
awesome!

Thanks,


Jon


On Sep 20, 7:09 pm, Jon Sutherland <jon.sutherl...@gmail.com> wrote:
> I am using android.hardware.Camera to get a preview and display it on
> a custom SurfaceView that implements SurfaceHolder.Callback.
>
> I am trying to zoom in to the camera preview surface by a specified
> scale (not using the camera's digital zoom) but I can't seem to find a
> correct way to do it.  I also need to be able to zoom out and scale
> down the preview.
>
> I was hoping to be able to do this using a ScaleAnimation but it
> doesn't seem to work on SurfaceView, nor the FrameLayout containing
> the SurfaceView.
>
> I also tried setting the size of the SurfaceView using setLayoutParams
> but that doesn't seem to work too well on various hardware and it
> would be tough to animate smoothly.
>
> Does anyone has any suggestions on how to achieve this effect?  Right
> now I am starting to think I might have to implement this using
> GLSurfaceView but I'm very unsure.
>
> Thanks,
>
> Jon

-- 
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

Reply via email to