Monday, January 10, 2011

[android-developers] Create a subset of Bitmap without make a copy

Hi at all,

I have this problem, when I try to make a new bitmap for another one,
like this:

first_data = Bitmap.createBitmap(data, 0, 0, data.getWidth() /
2,data.getHeight());
second_data = Bitmap.createBitmap(data, data.getWidth() / 2, 0,
data.getWidth() / 2, data.getHeight() );

I meet an OutOfMemoryException...

If i use only the original full image I don't meet this issues, I
think that Bitmap.createBitmap() make a copy of the original first
image.

There are a way to specify that I DON'T WANT make a copy of that?

Thanks a lot!

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate