To be more specific, what I really want to do now is capture a
snapshot of a view, and use this pixeldata as an openGL texture.

As a test case Im trying this code:

    int[]  extractPixelsFromView(View view)
    {
        int width = 320;
        int height = 640;

        int[] pixels = new int[320*640];

        Bitmap b = Bitmap.createBitmap(width, height, true);
        Canvas c = new Canvas(b);
        view.draw(c);
        b.getPixels(pixels, 0, width, 0, 0, width, height);
        return pixels;
    }

but its not working.  the pixel data is unchanged from all 0's.


On Jun 2, 12:35 pm, stefoid <[EMAIL PROTECTED]> wrote:
> Specifically:
>
> I have two views, A and B
>
> I want to set the background of view A with a snapshot of the current
> state/image of view B
>
> Possible?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to