Um, draw the two bitmaps one by one, applying any transformation as
necessary?

View rendering is double buffered, so you won't have flicker. You'd need a
view subclass for this, overriding onDraw.
06.04.2011 22:53 пользователь "Krzysztof Majkowski" <[email protected]>
написал:
> I want to merge and show two bitmaps few times per second ( I'm using
> orientation sensor and need to display in ImageView two parts of one
> big bitmap ).
>
> Bitmap b = BitmapFactory.decodeFile( url );
> Bitmap all = Bitmap.createBitmap( xScreen, yScreen,
> Config.ARGB_8888 );
> Canvas c = new Canvas( all );
> ImageView imageView = ...;
>
> public void drawBitmaps( float values[] )
> {
> ...
> c.save();
> Bitmap b2 = Bitmap.createBitmap( b, 0, startY,
> xScreen / 2, yScreen );
> Bitmap b3 = Bitmap.createBitmap( b, startX, startY,
> xScreen / 2, yScreen );
>
> c.drawBitmap( b2, 0, 0, null );
> c.drawBitmap( b3, startX, 0, null );
> imageView.setImageBitmap( all );
> c.restore();
> }
>
> I need to call drawBitmaps(...) few times per second, and operation
> Canvas.drawBitmap(...) take a lot of time and it's useless. Do you
> know any better idea how to merge two bitmaps faster?
>
> --
> 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]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
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]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to