Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Any way to access pixel data in 2.1 without OpenGL?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Hans L  
View profile  
 More options Jul 14 2010, 10:15 pm
From: Hans L <theh...@gmail.com>
Date: Wed, 14 Jul 2010 21:15:48 -0500
Local: Wed, Jul 14 2010 10:15 pm
Subject: Any way to access pixel data in 2.1 without OpenGL?

I was excited to try the bitmap-plasma sample included in the NDK, until I
saw that the project requires Android 2.2 or higher.
My goal is to be able to write something for android 2.1 using the NDK, that
can somehow manipulate pixel data and get it to the screen.
Is OpenGL the only possible option for graphics development in NDK targeting
2.1 users?  Or is there maybe some other workaround besides the Bitmap
interface in 2.2.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Angus Lees  
View profile  
 More options Jul 14 2010, 11:07 pm
From: Angus Lees <al...@google.com>
Date: Thu, 15 Jul 2010 13:07:22 +1000
Local: Wed, Jul 14 2010 11:07 pm
Subject: Re: Any way to access pixel data in 2.1 without OpenGL?

On Thu, Jul 15, 2010 at 12:15, Hans L <theh...@gmail.com> wrote:
> I was excited to try the bitmap-plasma sample included in the NDK, until I
> saw that the project requires Android 2.2 or higher.
> My goal is to be able to write something for android 2.1 using the NDK,
> that can somehow manipulate pixel data and get it to the screen.
> Is OpenGL the only possible option for graphics development in NDK
> targeting 2.1 users?  Or is there maybe some other workaround besides the
> Bitmap interface in 2.2.

You can create arrays of pixel data and pass it to/from JNI functions easily
enough - and then use Android Bitmap functions like copyPixelsFromBuffer or
setPixels.  These all involve an extra copy to use unfortunately, which is
why the froyo bitmap functions were added.  There are also annoying
limitations in the Bitmap API when used with JNI, like no way to do partial
updates from a Buffer, etc.

 - Gus


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Onur Cinar  
View profile  
 More options Jul 15 2010, 1:10 am
From: Onur Cinar <onur.ci...@gmail.com>
Date: Wed, 14 Jul 2010 22:10:49 -0700
Local: Thurs, Jul 15 2010 1:10 am
Subject: Re: Any way to access pixel data in 2.1 without OpenGL?

Hi Hans,

I wouldn't suggest OpenGL for this purpose, since based on my tests, for
simple 2D rendering, the direct Surface drawing is much faster.

You can pass the pixel data through Java NIO to the Java layer for painting,
which performs very well compared to ByteArray approach.

The Java Bitmap itself does some memory copying, and even color space
conversions, so if you have your pixel data in RGB565 color space you can
prevent these steps as well. When I did a few tests on a Motorola Droid, I
was able to achieve 230 fps with VGA using RGB565 color space. Using ARGB
16bit about 82 fps, and ARGB 32 bit about 140 fps.

There are few other ways, but these are the only options available through
the public API.

Regards,

-onur

---
www.zdo.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hans L  
View profile  
 More options Jul 16 2010, 2:59 am
From: Hans L <theh...@gmail.com>
Date: Fri, 16 Jul 2010 01:59:53 -0500
Local: Fri, Jul 16 2010 2:59 am
Subject: Re: Any way to access pixel data in 2.1 without OpenGL?

Thanks for the reply, but I'm very new to this, and your post is too vague
for me to understand what methods you are referring to exactly.  What do you
mean by the ByteArray approach?  Is that even a class?  Or are you literally
talking about "byte[]"?

Could you possibly give a snippet of example code or even just name the
class methods that you are using?  What dataype exactly are you passing back
and forth to native code?

Hans


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Onur Cinar  
View profile  
 More options Jul 16 2010, 2:00 pm
From: Onur Cinar <onur.ci...@gmail.com>
Date: Fri, 16 Jul 2010 11:00:51 -0700
Local: Fri, Jul 16 2010 2:00 pm
Subject: Re: Any way to access pixel data in 2.1 without OpenGL?

Hi Hans,

Sure, I'll type more details tonight on all these approaches. FYI.

Regards,

-onur


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »