Create Bitmap from SurfaceView

9.596 weergaven
Naar het eerste ongelezen bericht

serveace6

ongelezen,
30 mrt 2009, 18:45:4530-03-2009
aan android-platform
It appears that you can create a bitmap from what is showing on the
screen via View.getDrawingCache() once View.setDrawingCacheEnabled()
is set to true. But it does not seems to work for the SurfaceView.
Is there a way to do it?

Simon Depiets

ongelezen,
30 mrt 2009, 19:47:2930-03-2009
aan android-...@googlegroups.com
2009/3/31 serveace6 <phuc...@gmail.com>:
I did it with an ImageView because i had the same problem you have

Worked fine with ImageView


--
Lliane aka Simon Depiets
Epita Promo 2011,42
http://www.lliane.com
A man is smoking with his girlfriend. She angers herself : "don't you
see the warning on the box ?!"
To which the man replies, "I am a programmer. I don't worry about
warnings. I only worry about errors."

Dianne Hackborn

ongelezen,
30 mrt 2009, 20:48:2830-03-2009
aan android-...@googlegroups.com
Sorry, by its nature a SurfaceView does not draw in the normal view hierarchy update system, so it won't be drawn in that.
--
Dianne Hackborn
Android framework engineer
hac...@android.com

Note: please don't send private questions to me, as I don't have time to provide private support.  All such questions should be posted on public forums, where I and others can see and answer them.

serveace6

ongelezen,
31 mrt 2009, 02:16:3231-03-2009
aan android-platform
So it is not possible to take a snapshot of what is showing on the
SurfaceView? If it is possible, how would you do it?

On Mar 30, 5:48 pm, Dianne Hackborn <hack...@android.com> wrote:
> Sorry, by its nature a SurfaceView does not draw in the normal view
> hierarchy update system, so it won't be drawn in that.
>
> On Mon, Mar 30, 2009 at 3:45 PM, serveace6 <phucs...@gmail.com> wrote:
>
> > It appears that you can create a bitmap from what is showing on the
> > screen via View.getDrawingCache() once View.setDrawingCacheEnabled()
> > is set to true.  But it does not seems to work for the SurfaceView.
> > Is there a way to do it?
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com

Dianne Hackborn

ongelezen,
31 mrt 2009, 03:46:4031-03-2009
aan android-...@googlegroups.com
I don't believe so; the purpose of surface view is to provide a dedicated hardware accelerated drawing surface, which can be in an unusual format like yuv, so doing screenshots out of it is not that simple.
hac...@android.com

Dave Sparks

ongelezen,
31 mrt 2009, 11:37:5131-03-2009
aan android-platform
In fact, there are cases where the display data for the SurfaceView
isn't even accessible to the app processor - it may be the output of a
hardware video pipeline that is composited with the display output of
the app processor through a dedicated video overlay.

serveace6

ongelezen,
31 mrt 2009, 18:50:0931-03-2009
aan android-platform
Thanks for all the help!

shubh

ongelezen,
13 aug 2012, 03:18:3313-08-2012
aan android-...@googlegroups.com
did any one try http://www.droidnova.com/how-to-create-and-save-a-screenshot-from-a-surfaceview,880.html , here there are showing capture bitmap using surface view ?
Allen beantwoorden
Auteur beantwoorden
Doorsturen
0 nieuwe berichten