*Maybe this will helpful for you*
opt = new BitmapFactory.Options();
opt.inTempStorage = new byte[16 * 1024];
opt.inSampleSize = 4;
opt.outWidth = 640;
opt.outHeight = 480;
Bitmap imageBitmap = BitmapFactory
.decodeStream(in, new Rect(), opt);
Bitmap map = Bitmap.createScaledBitmap(imageBitmap, 100, 100, true);
BitmapDrawable bmd = new BitmapDrawable(map);
ByteArrayOutputStream bao = new ByteArrayOutputStream();
map.compress(Bitmap.CompressFormat.PNG, 90, bao);
ba = bao.toByteArray();
imagedata=Base64.encodeBytes(ba);
WITH REGARDS
ARUN KUMAR P D
+91-9994794759
--
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