docs: public static IndexColorModel createIndexColorModel(PixelPacket[] pColormap, boolean pAlpha) {
          int[] colors = new int[pColormap.length];
  
          // TODO: Verify if this is correct for alpha...?
          int trans = pAlpha ? colors.length - 1 : -1;
  
          //for (int i = 0; i < pColormap.length; i++) {
          for (int i = pColormap.length - 1; i != 0; i--) {
              PixelPacket color = pColormap[i];
              if (pAlpha) {
                  colors[i] = (0xff - (color.getOpacity() & 0xff)) << 24 |
                              (color.getRed()     & 0xff) << 16 |
                              (color.getGreen()   & 0xff) <<  8 |
                              (color.getBlue()    & 0xff);
              }
              else {
                  colors[i] = (color.getRed()     & 0xff) << 16 |
                              (color.getGreen()   & 0xff) <<  8 |
                              (color.getBlue()    & 0xff);
              }
          }
  
          return new InverseColorMapIndexColorModel(8, colors.length, colors, 0, pAlpha, trans, DataBuffer.TYPE_BYTE);
      }