docs: void initIRGB(int[] pTemp) {
          final int x = (1 << TRUNCBITS);        // 8 the size of 1 Dimension of each quantized cell
          final int xsqr = 1 << (TRUNCBITS * 2); // 64 - twice the smallest step size vale of quantized colors
          final int xsqr2 = xsqr + xsqr;
  
          for (int i = 0; i < numColors; ++i) {
              if (i == transparentIndex) {
                  // Skip the transparent pixel
                  continue;
              }
  
              int red, r, rdist, rinc, rxx;
              int green, g, gdist, ginc, gxx;
              int blue, b, bdist, binc, bxx;
  
              // HaraldK 20040801: Added support for int[]
              if (rgbMapByte != null) {
                  red = rgbMapByte[i * 4] & 0xFF;
                  green = rgbMapByte[i * 4 + 1] & 0xFF;
                  blue = rgbMapByte[i * 4 + 2] & 0xFF;
              }
              else if (rgbMapInt != null) {
                  red = (rgbMapInt[i] >> 16) & 0xFF;
                  green = (rgbMapInt[i] >> 8) & 0xFF;
                  blue = rgbMapInt[i] & 0xFF;
              }
              else {
                  throw new IllegalStateException("colormap == null");
              }
  
              rdist = red - x / 2;   // distance of red to center of current cell
              gdist = green - x / 2; // green
              bdist = blue - x / 2;  // blue
              rdist = rdist * rdist + gdist * gdist + bdist * bdist;
  
              rinc = 2 * (xsqr - (red << TRUNCBITS));
              ginc = 2 * (xsqr - (green << TRUNCBITS));
              binc = 2 * (xsqr - (blue << TRUNCBITS));
  
              int rgbI = 0;
              for (r = 0, rxx = rinc; r < MAXQUANTVAL; rdist += rxx, ++r, rxx += xsqr2) {
                  for (g = 0, gdist = rdist, gxx = ginc; g < MAXQUANTVAL; gdist += gxx, ++g, gxx += xsqr2) {
                      for (b = 0, bdist = gdist, bxx = binc; b < MAXQUANTVAL; bdist += bxx, ++b, ++rgbI, bxx += xsqr2) {
                          if (i == 0 || pTemp[rgbI] > bdist) {
                              pTemp[rgbI] = bdist;
                              inverseRGB[rgbI] = (byte) i;
                          }
                      }
                  }
              }
          }
      }