2D Graphics Manipulator
This is a Java program that demonstrates the manipulation of 2D graphics using the java.awt.*
package and a Graphics2D
object. It can generate a fractal image, convert pixels of an existing image to greyscale, and generate a random image where each pixel is a random color. The input image is hardcoded as input.jpg and located in the working directory, and the output images are also saved in the working directory.
Features
- Generate fractal images using recursion
- Convert existing images to greyscale
- Generate random images with random colored pixels
Dependencies
- Java Development Kit (JDK)
- IDE (Integrated Development Environment) or a text editor
Usage
javac main.java
java main
- The program will execute all three functions:
generateRandom
,generateFractal
, andconvertGrayscale
.
Note
- The program uses recursion and image processing techniques to generate fractal images and to perform image manipulation
- The program uses the
java.awt.*
package and aGraphics2D
object to perform image manipulation - The input image is hardcoded and located in the working directory, the output images are also saved in the working directory.
License
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.