<Buffer size not large enough> Facing this error j...
# stackoverflow
u
Buffer size not large enough Facing this error java.lang.RuntimeException: Buffer not large enough for pixels Error Code Line : - val byteBuffer: ByteBuffer = ByteBuffer.allocate(1024*1024*5) bitmap.copyPixelsToBuffer(byteBuffer) I think its the error is Buffer Capacity is small for my image to copy bitmap but than what is the good approach? How much buffer capacity I must assign to not have the error?