Here you can find the source of swap32(int rgb)
public static int swap32(int rgb)
//package com.java2s; public class Main { public static int swap32(int rgb) { int a = (rgb >> 24) & 0xFF; int r = (rgb >> 16) & 0xff; int g = (rgb >> 8) & 0xff; int b = rgb & 0xff; return (b << 24) | (g << 16) | (r << 8) | a; }/*from w w w . j ava 2 s. c o m*/ }