That didn't work. but i created and int array instead.

On 10 Dec, 15:31, Mike Reed <r...@google.com> wrote:
> If the image is predrawn, then you can just store it as .png, and then  
> decode it (BitmapFactory) with a preferred config as RGB_565 (see  
> BitmapFactory options).
>
> If the image is drawn by your code, and you can create a Bitmap in  
> RGB_565, and use setPixels(int[]), which will down-sample your ints to  
> 565 shorts for you.
>
> Either way, the resulting Bitmap will be 565, which should draw very  
> quickly to the screen (assuming no matrix on the canvas, and no alpha  
> or colorFilter or xfermode on the paint).
>
> On Dec 10, 2008, at 5:39 AM, Romkin wrote:
>
> To be honest the surface in created in C, as char* and originally i
> wanted to use 16bit colour, but Bitmap takes int[], which means i have
> to use 32bit, is there a way i can solve it to use 16bit?
>
> On 9 Dec, 17:38, Mike Reed <r...@google.com> wrote:
>
> > I am assuming you have predrawn what you want in the Bitmap. If so, be
> > sure that the Bitmap's config matches your window (typically 565),
> > otherwise things will go a lot slower, as we depth-convert your Bitmap
> > each time it is drawn.
>
> > If you have a large area that is a solid color, it might be faster to
> > draw that (via canvas.drawColor or canvas.drawRect) and then draw the
> > bitmap. It all depends, but the fastest a Bitmap can go is memcpy, but
> > drawing a large area in a solid color can use memset, which is faster
> > for the same number of dst pixels.
>
> > On Dec 9, 2008, at 11:54 AM, Romkin wrote:
>
> > What is the fastest way to draw on screen?
>
> > currently we use OnDraw and have Bitmap, but is there a faster way to
> > draw pixel array to screen?
>
> > Thanks.
--~--~---------~--~----~------------~-------~--~----~
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