title: Android- convert ARGB_8888 bitmap to 3BYTE_BGR
body: <p>I get the pixel data of my ARGB_8888 bitmap by doing this:</p>
  
  <pre><code>public void getImagePixels(byte[] pixels, Bitmap image) {
      // calculate how many bytes our image consists of
      int bytes = image.getByteCount();
  
      ByteBuffer buffer = ByteBuffer.allocate(bytes); // Create a new buffer
      image.copyPixelsToBuffer(buffer); // Move the byte data to the buffer
  
      pixels = buffer.array(); // Get the underlying array containing the data.
  }
  </code></pre>
  
  <p>But, I would like to convert this data, in which each pixel is stored on four bytes (ARGB), to where each pixel is stored on 3 bytes (<strong>BGR</strong>).<br>
  Any help is appreciated!</p>