How to copy part of one bitmap for another?

All your problems with Audio, Video and Images.

How to copy part of one bitmap for another?

Postby hudvin » Wed Jan 14, 2009 3:54 pm

I have bitmap 256x256 and I need to copy, for example all from x=128 y=128 to another bitmap (128*128).
I try to use getPixel/setPixel methods, but they are very slow.
hudvin
Freshman
Freshman
 
Posts: 6
Joined: Wed Jan 14, 2009 3:50 pm

Top

Postby MrSnowflake » Wed Jan 14, 2009 6:07 pm

Can't you make a canvas and draw the bitmap to that canvas. But use a source rectangle so you only draw the part of the bitmap you like. And then use the canvas to make the new bitmap.

Don't know if this is possible with Android.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby ohyes » Thu Feb 25, 2010 6:55 am

ohyes
Junior Developer
Junior Developer
 
Posts: 10
Joined: Fri Jul 10, 2009 2:51 am

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 12 guests