docs: public static byte[] getPixelsBGR(BufferedImage img, int y, int w, byte[] array, int[] temp) {
      final int x = 0;
      final int h = 1;
  
      assert array.length == temp.length * nrChannels(img);
      assert (temp.length == w);
  
      int imageType = img.getType();
      Raster raster;
      switch (imageType) {
        case BufferedImage.TYPE_3BYTE_BGR:
        case BufferedImage.TYPE_4BYTE_ABGR:
        case BufferedImage.TYPE_4BYTE_ABGR_PRE:
        case BufferedImage.TYPE_BYTE_GRAY:
          raster = img.getRaster();
          //int ttype= raster.getTransferType();
          raster.getDataElements(x, y, w, h, array);
          break;
        case BufferedImage.TYPE_INT_BGR:
          raster = img.getRaster();
          raster.getDataElements(x, y, w, h, temp);
          ints2bytes(temp, array, 0, 1, 2);  // bgr -->  bgr
          break;
        case BufferedImage.TYPE_INT_RGB:
          raster = img.getRaster();
          raster.getDataElements(x, y, w, h, temp);
          ints2bytes(temp, array, 2, 1, 0);  // rgb -->  bgr
          break;
        case BufferedImage.TYPE_INT_ARGB:
        case BufferedImage.TYPE_INT_ARGB_PRE:
          raster = img.getRaster();
          raster.getDataElements(x, y, w, h, temp);
          ints2bytes(temp, array, 2, 1, 0, 3);  // argb -->  abgr
          break;
        case BufferedImage.TYPE_CUSTOM: // TODO: works for my icon image loader, but else ???
          img.getRGB(x, y, w, h, temp, 0, w);
          ints2bytes(temp, array, 2, 1, 0, 3);  // argb -->  abgr
          break;
        default:
          img.getRGB(x, y, w, h, temp, 0, w);
          ints2bytes(temp, array, 2, 1, 0);  // rgb -->  bgr
          break;
      }
  
      return array;
    }