Welcome to the Image Processing Application project, developed as part of the **Web Application Development ** course. This CLI application allows users to modify image formats, convert images to black and white, and apply a blur effect. It is designed to be user-friendly while offering powerful image processing features.
- Image Ratio Modification: Modifies the format ratio of your image. For example, if you insert a squared image, it can crop it to 4/5.
- Black and White Conversion: Transform your image to grayscale.
- Blur Effect: Apply a blur effect on the whole image or part of it. Blur strength can be adjusted.
- Java JDK 21
- Maven for dependency management and building the project
- Git for cloning the repository
- IntelliJ IDEA (optional) for easier setup
Open your terminal and run the following command to clone the repository:
git clone https://github.com/HEIG-VD-DAI-Iseni-Jacobs/pictures-cli-editor.git
Using the Terminal
Navigate to the cloned project directory and use Maven to build the application:
cd pictures-cli-editor
mvn spotless:apply dependency:go-offline clean compile package
Once the project is built, you can run the application using the following command:
java -jar target/pictures-cli-editor-1.0-SNAPSHOT.jar <inputPath> <outputPath> <command>
The application provides a command-line interface where you can choose the desired image processing options.
- input path specifies which picture you want to modify
- output path specifies where you want to save the modified image. If not provided, the input path will be used and "_edited" will be appended to the file name before the extension. The output file will always be in .bmp format.
- grey
- blur
- crop
Select the desired option by entering the corresponding name.
Using IntelliJ IDEA
In the "Run" tab, select Package application as JAR file
and run it.
In the "Run" tab, select Run the application (needs parameters)
or other configs and run it.
By default, no parameters are given so the help message will display.
Feel free to update the run config or launch the app from the terminal to add your parameters !
For more details on the commands see Available Commands.
The pictures were taken by ourselves. We had to convert them to bmp and reduce their size as bmp is not optimised and takes much space. For this purpose, two options are possible:
- Use online converters such as convertio and reduceimages
- Use magick, a dedicated CLI software. Here's the command used :
magick mogrify -resize 1080x1620 -depth 8 -format bmp *.jpg
Before: | After: |
---|---|
Used command
java -jar target/pictures-cli-editor-1.0-SNAPSHOT.jar src/resources/pictures/golf_7r.bmp output_examples/golf_7r_5_4.bmp crop -f 5/4
Before: | After: |
---|---|
Used command
java -jar target/pictures-cli-editor-1.0-SNAPSHOT.jar src/resources/pictures/rosa_mir.bmp output_examples/rosa_mir_grey.bmp grey
Before: | After: |
---|---|
Used command
java -jar target/pictures-cli-editor-1.0-SNAPSHOT.jar ./src/resources/pictures/bird.bmp ./output_examples.bmp blur -r 10 --x1 550 --y1 700 --x2 750 --y2 900
Contributions are welcome! To contribute:
- Create an issue describing the feature you want to implement
- Fork the project and clone it
- Create your feature branch
git checkout -b feature/my-feature
- Commit your changes
git commit -m "Add my feature"
- Push the branch
git push
- Open a Pull Request
If you have any questions or suggestions, feel free to open an issue on GitHub.