Color component Archive

Creating grayscale image of original picture

Converting an image to grayscale is really simple. You can create grayscale image by setting same value for Red, Green and Blue. It means RGB encoding supports 256 level of grays from (0,0,0), (1,1,1) throught (150,150,150) and finally (255,255,255). Tricky part to create grayscale image is to find replicated value or value level to form

Lightening and Darkening picture in Java

As described in previous articles, we need to change color component to darken or lighten a picture. Below is the method to lighten the picture. public void brighter() { // Get all pixel Pixel pixelArray = this.getPixels(); // Iterate through all pixel for (int index = 0; index < pixelArray.length; index++) // get the current