Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class FleaFilter extends RGBImageFilter{
- ColorModel cm=ColorModel.getRGBdefault();
- public FleaFilter()
- {
- canFilterIndexColorModel=true;
- }
- public int filterRGB(int x, int y, int rgb)
- {
- Random Rred=new Random();
- Random Rgreen=new Random();
- Random Rblue=new Random();
- Color backup=new Color(Rred.nextInt(255),
- Rgreen.nextInt(255),Rblue.nextInt(255));
- return rgb|backup.getRGB();
- }
- }
Add Comment
Please, Sign In to add comment