Here you can find the source of colorToRGB(final int alpha, final int red, final int green, final int blue)
private static int colorToRGB(final int alpha, final int red, final int green, final int blue)
//package com.java2s; //License from project: Apache License public class Main { private static int colorToRGB(final int alpha, final int red, final int green, final int blue) { int newPixel = 0; newPixel += alpha;/*from www . j a v a 2 s .co m*/ newPixel = newPixel << 8; newPixel += red; newPixel = newPixel << 8; newPixel += green; newPixel = newPixel << 8; newPixel += blue; return newPixel; } }