print Pixel ARGB - Java 2D Graphics

Java examples for 2D Graphics:Pixel

Description

print Pixel ARGB

Demo Code


//package com.java2s;

public class Main {
    public static void printPixelARGB(int pixel) {
        int alpha = (pixel >> 24) & 0xff;
        int red = (pixel >> 16) & 0xff;
        int green = (pixel >> 8) & 0xff;
        int blue = (pixel) & 0xff;
        System.out.println("argb: " + alpha + ", " + red + ", " + green
                + ", " + blue);
    }//from  w w  w  . j  a v a  2  s .com
}

Related Tutorials