Blixinator
By: a guest | Feb 9th, 2010 | Syntax:
Java | Size: 0.76 KB | Hits: 48 | Expires: Never
import java.awt.image.*;
import javax.imageio.ImageIO;
import java.io.*;
import java.util.*;
public class AllRGB
{
{
AllRGB prog = new AllRGB();
prog.
bi = ImageIO.
read(new File("<FILE PATH>"));
int width = prog.bi.getWidth();
int height = prog.bi.getHeight();
int RGB;
boolean colors[] = new boolean[256*256*256];
boolean usesAllRGB = true;
for(int a=0; a<width; a++)
{
for(int b=0; b<height; b++)
{
RGB = prog.bi.getRGB(a,b);
if(colors[-RGB-1]==false)
colors[-RGB-1]=true;
else
{
a=width;
b=height;
usesAllRGB=false;
}
}
}
System.
out.
println(usesAllRGB
);
}
}