I have a byte array, which contains an image... i'd like to save it cropped.
My working method was: get the byte[] convert it into a bitmap with BitmapFactory.decodebytearray make another bitmap from it with createbitmap(sourceBitmap, x1, y1, whileX, whileY) recycle the first (uncropped one) save out the second, then recycle that too
the problem is that for a while it exists 2 bitmap, the original and the cropped one, and thats why i cant use this method with larger images (over 3MP)
is there a way to crop image directly from the byte array? I saw that there is a decodeByteArray(dataArray, offset, length, options), but i couldn't make an image from it (the remaining data was not an image)... could someone help maybe?