Here you can find the source of average4RGBA(int var0, int var1, int var2, int var3)
private static int average4RGBA(int var0, int var1, int var2, int var3)
//package com.java2s; //License from project: LGPL public class Main { private static int average4RGBA(int var0, int var1, int var2, int var3) { int var4 = var0 & 255; int var5 = var1 & 255; int var6 = var2 & 255; int var7 = var3 & 255; switch (var4 << 24 | var5 << 16 | var6 << 8 | var7) { case -16777216: return var0; case -16776961: return average2RGBA(var0, var3); case -16711936: return average2RGBA(var0, var2); case -65536: return average2RGBA(var0, var1); case -1://from w ww. j a va 2 s. co m case 0: return average2RGBA(average2RGBA(var0, var3), average2RGBA(var1, var2)); case 255: return var3; case 65280: return var2; case 65535: return average2RGBA(var2, var3); case 16711680: return var1; case 16711935: return average2RGBA(var1, var3); case 16776960: return average2RGBA(var1, var2); default: int var8 = var4 + var5 + var6 + var7; int var9 = var8 >> 2; for (int var10 = 8; var10 < 32; var10 += 8) { int var11 = (var4 * (var0 >> var10 & 255) + var5 * (var1 >> var10 & 255) + var6 * (var2 >> var10 & 255) + var7 * (var3 >> var10 & 255)) / var8; var9 |= var11 << var10; } return var9; } } private static int average2RGBA(int var0, int var1) { return ((var0 & -16843010) >>> 1) + ((var1 & -16843010) >>> 1) | var0 & var1 & 16843009; } }