Guest User

Untitled

a guest
Jul 17th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. class FleaFilter extends RGBImageFilter{
  2.  
  3. ColorModel cm=ColorModel.getRGBdefault();
  4.  
  5. public FleaFilter()
  6. {
  7. canFilterIndexColorModel=true;
  8. }
  9.  
  10. public int filterRGB(int x, int y, int rgb)
  11. {
  12. Random Rred=new Random();
  13. Random Rgreen=new Random();
  14. Random Rblue=new Random();
  15. Color backup=new Color(Rred.nextInt(255),
  16. Rgreen.nextInt(255),Rblue.nextInt(255));
  17. return rgb|backup.getRGB();
  18. }
  19. }
Add Comment
Please, Sign In to add comment