code: private static int[] gammaLUT(double gammaValue) {
          int[] gammaLUT = new int[256];
  
          for (int i = 0; i < gammaLUT.length; i++) {
              gammaLUT[i] = (int) (255 * (Math.pow((double) i / (double) 255, gammaValue)));
          }
  
          return gammaLUT;
      }
docs: Create the gamma correction lookup table