6

I would like to run a camera preview in a higher resolution of those that are available on the device. From this preview I would like to crop a smaller part of the image and then display that scaled in on a surface view. So to make it clear, an example of what I want to achieve. 1. Run camera preview, let say in 800x600 resolution 2. Crop a piece of preview, say 400x400 3. Scale that to 200x200 and show that on 200x200 SurfaceView.

As far as I could see the preview is scales automatically to the SurfaceView size. So this last part is taken care of automatically (at least I hope so).

So, how to crop camera preview and scale it?

Anderson
  • 1,011
  • 2
  • 11
  • 24
  • Hi, I hope you solved this. Please share your answer – Erma Isabel Apr 30 '14 at 08:16
  • @Erma Isabel No, not to a satisfactory degree. What I do is: 1. I choose a preview resolution 2. Based on that I set a SurfaceView with same proportions inside a frame layout 3. with some other view i cover the unwanted portion of surface view. The preview is shrinked or stretched to the size of surface view, this is why you must have a SurfaceView of correct proportions. – Anderson Apr 30 '14 at 11:13

0 Answers0