|
|
@ -336,7 +336,8 @@ public final class ImageUtils { |
|
|
|
TexturePixel[] colors = new TexturePixel[] { new TexturePixel(), new TexturePixel(), new TexturePixel(), new TexturePixel() }; |
|
|
|
TexturePixel[] colors = new TexturePixel[] { new TexturePixel(), new TexturePixel(), new TexturePixel(), new TexturePixel() }; |
|
|
|
alphas[0] = data.get() * 255.0f; |
|
|
|
alphas[0] = data.get() * 255.0f; |
|
|
|
alphas[1] = data.get() * 255.0f; |
|
|
|
alphas[1] = data.get() * 255.0f; |
|
|
|
long alphaIndices = data.get() | data.get() << 8 | data.get() << 16 | data.get() << 24 | data.get() << 32 | data.get() << 40; |
|
|
|
//the casts to long must be done here because otherwise 32-bit integers would be shifetd by 32 and 40 bits which would result in improper values
|
|
|
|
|
|
|
|
long alphaIndices = (long)data.get() | (long)data.get() << 8 | (long)data.get() << 16 | (long)data.get() << 24 | (long)data.get() << 32 | (long)data.get() << 40; |
|
|
|
if (alphas[0] > alphas[1]) {// 6 interpolated alpha values.
|
|
|
|
if (alphas[0] > alphas[1]) {// 6 interpolated alpha values.
|
|
|
|
alphas[2] = (6 * alphas[0] + alphas[1]) / 7; |
|
|
|
alphas[2] = (6 * alphas[0] + alphas[1]) / 7; |
|
|
|
alphas[3] = (5 * alphas[0] + 2 * alphas[1]) / 7; |
|
|
|
alphas[3] = (5 * alphas[0] + 2 * alphas[1]) / 7; |
|
|
|