A Java application for applying various image filters including grayscale, sepia, and reflection effects.
- Java 17 or higher
- Maven 3.6 or higher
mvn clean compilemvn packagemvn exec:java "-Dexec.args=<path-to-image>"Examples:
# Run with an image in current directory
mvn exec:java "-Dexec.args=image.jpg"
# Run with a specific path
mvn exec:java "-Dexec.args=./photos/image.jpg"java -jar target/image-filter-1.0.0.jar <path-to-image>Examples:
# Run with an image in current directory
java -jar target/image-filter-1.0.0.jar image.jpg
# Run with a specific path
java -jar target/image-filter-1.0.0.jar ./photos/image.jpg- Grayscale - Converts image to grayscale
- Sepia - Applies warm sepia tone effect
- Reflection - Horizontally mirrors the image
Filtered images are saved with the filter name as prefix:
grayscale_<original-name>.jpgsepia_<original-name>.jpgreflection_<original-name>.jpg
| Command | Description |
|---|---|
mvn clean |
Clean compiled files |
mvn compile |
Compile source code |
mvn package |
Create JAR file |
mvn clean compile |
Clean and compile |
mvn exec:java "-Dexec.args=image.jpg" |
Run with Maven |
src/
main/
java/
Main.java # Main application class
target/
classes/ # Compiled classes
image-filter-1.0.0.jar # Executable JAR
pom.xml # Maven configuration
README.md # This file
When you run the application, you'll see a menu:
Current image: your-image.jpg
Available commands:
1 - Apply Grayscale filter
2 - Apply Sepia filter
3 - Apply Reflection filter
q - Quit the program
h - Show this help message
Enter your choice:
Simply enter the number corresponding to the filter you want to apply, or 'q' to quit.