rusawa

Java - Image Processing Application

Built in Java with BufferedImage class and Swing for GUI, this application provides functions for manipulating values of: brightness, RGB channels, hue and pixelation. It can also convert pictures to gray scale, create a negative and export the edited picture.

Start

The program takes .jpg photos from a folder with address "C:/IMG/".

File input error

If the correct file format is not provided, an error message appears.

Editing window

When a photo has been successfuly loaded, the preview of it is shown in the editing window.

Window orientation

When the chosen image has a vertical orientation, the editing window adjusts itseft to the given position.

Brightness adjustment

Allows the user to slightly increase or decrease the brightness of the photo.

adjustBrightness method

A static method that takes an image and a value from the slider as parameters. It loops through pixels adjusting their RGB values.

Color balance

Provides sliders that manipulate three color channels:
red - cyan, green - magenta, blue - yellow.

colorFilter method

A static method that takes an image, a char indicating which color is going to be adjusted and a value from the slider as parameters. It loops through pixels adjusting their color value indicated by the char parameter.

Color sliders

The slider's background changes color to the value that is being applied to the photo.

Pixelation

Default value is 0. Applies different levels of pixelation to the image.

pixelate method

A static method that takes an image and a value from the slider as parameters. The value is the size of a side of a square of pixels that gets filled with one color to create a new big "pixel".

Hue slider

Changes the hue of the image. Allows to go through the full, 360deg spectrum of hue.

adjustHue method

A static method that takes an image and a value from the slider as parameters. It converts RGB into HSB values and adjusts the hue value.

Gray scale

A checkbox that converts the image to the gray scale.

toGrayScale method

A static method that changes BufferedImage's TYPE_BYTE and utilizes Graphics class to change the image.

Negative

A checkbox that creates a negative of the image.

negative method

A static method that loops through pixels and subtracts pixel's RGB values from the max value, creating a negative.

Saving preview window

After clicking "Save" button, the preview window opens.

Previewing changes

The user can toggle between the original and the processed preview. Before saving, a valid name has to be provided for the file.

Saving

If a valid name is provided, "Apply" button will apply the changes and export the image.

Success!

If everything goes right, the user has the option to exit the program or to continue editing.

Exported image

The exported image is located in "C:/IMG/OUT/".