title: Buffer size not large enough
body: <p>Facing this error</p>
  <pre><code>java.lang.RuntimeException: Buffer not large enough for pixels
  </code></pre>
  <p>Error Code Line : -</p>
  <pre><code>val byteBuffer: ByteBuffer = ByteBuffer.allocate(1024*1024*5)
                      bitmap.copyPixelsToBuffer(byteBuffer)
  </code></pre>
  <p>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?</p>