Change Color of An Image In JAVA

In this article we will learn how to Change Color of An Image In JAVA language. This is too much easy tutorial for beginners.
BufferedImage img = new BufferedImage(600, 315, BufferedImage.TYPE_INT_RGB );
for ( int rc = 0; rc < 315; rc++ )
{
   for ( int cc = 0; cc < 600; cc++ )
   {
       img.setRGB(cc, rc, Color.BLACK.getRGB() ); //put color on image
   }
}
String path = System.getProperty("user.home");
ImageIO.write(img, "PNG", new File(path+"\\Documents\\NetBeansProjects\\img.png"));
Change Color of An Image In JAVA Change Color of An Image In JAVA Reviewed by Unknown on 15:28 Rating: 5