Monday, October 4, 2010

[android-developers] bitmap magnification

with imageview and network-thread,i am making live cam-view ,bitmap
size is "360 240",
after parsing network-data to bitmap
BitmapFactory.Options options = new BitmapFactory.Options();
options.inSampleSize = 2;
Bitmap orgBitmap = BitmapFactory.decodeByteArray();
Bitmap bitmap = Bitmap.createScaledBitmap(orgBitmap, width, height /
2 , true);

if (bitmap != null) {
Message msg = Message.obtain(handler, 0, current_ch, 0, bitmap);
handler.sendMessage(msg);
}

send bitmap by Message to ImageView.setImageBitmap(bitmap);

all thing is good ,i can see live-cam
but, to fit image in screen like "
Bitmap.createScaledBitmap(orgBitmap, width, height / 2 , true)"
Seeing bitmap is getting slow , the bigger bitmap is , the more speed
down
finally, shut-downed

how to fit image in screen without pain

--
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