Category: Java

java tutorials

Convert Image to Grayscale using Java

In this example we demonstrate how to convert Image to Grayscale using Java. Convert Image to Grayscale We use the ImageIO.read() method to read an image to BufferedImage. Then we loop over each pixel...
java tutorials

Convert Image to Black and White using Java

This example demonstrates how to convert an image to Black and White using Java. A 1-bit image is created with an IndexColorModel with two colors in the default sRGB ColorSpace: {0,0,0} and {255,255,255}. Convert...
java tutorials

Convert PNG to JPG Image file using Java

This example demonstrates how to convert PNG to JPG image file using Java. You can expect some quality loss when converting images to/from PNG/JPG. PNG supports transparent background. JPG does not support transparent background....