In my project I have an bitmap image. I need to convert this picture to byteArray in order to manipulate some bytes and after that save it as image.
with this code image = BitmapFactory.decodeResource(context.getResources(), R.drawable.tasnim); I have acces to width and height but how can I have access to bytes of this image?
Thanks
I’m assuming the OP wants to manipulate the pixels, not the header information of the Image…
Assuming your
imageis aBitmapOf course, this gets you Pixel values as Integers…But you can always convert them again.