Bitmap bmp = BitmapFactory.decodeResource(getResources(), R.drawable.abstrakt);
ByteArrayOutputStream stream = new ByteArrayOutputStream();
bmp.compress(Bitmap.CompressFormat.PNG, 100, stream);
byte[] byteArray = stream.toByteArray();
Enjoy:--)
Don’t forget to provide feedback or follow this blog, if you find this blog is useful.
It is rendering the image too small with really low pixel density. Any way around it you know??
ReplyDeleteThanks
Hello Achin,
DeleteSorry My Friend, I don't know about this.