This is a simple project made for educational purposes to practice multithreaded programming.
This console application allows you to increase and decrease the size of the original image(s)
Resizing algorithms:
- resize by nearest neighbor algorithm
- resize by imgscalr
- resize by Graphics2D with RenderingHints
To run the application, you must run the riser.jar which I added to the assets folder or run the mvn package
command (the jar will be in the target folder)
- Java - version 11
➜ java -jar resizer.jar -h
Usage: <main class> [options]
Options:
--dst, -d
Path to destination directory
Default: (by default image(s) will be saved in src directory)
--mode, -m
Mode of resizing image:
1 - resize by nearest neighbor algorithm;
2 - resize by imgscalr;
3 - resize by Graphics2D with RenderingHints
Default: 3
--size, -S
New image size (by default the image will be resized to size 300px)
Default: 300
* --src, -s
Path to source image/directory
➜ java -jar resizer.jar -s /path/src -d /path/dst -S 400 -m 3
Duration: 19677
Count of objects: 501
➜ java -jar resizer.jar -s /path/image.jpg -S 1920 -m 2
Duration: 6273
Count of objects: 1
Before | After |
---|---|
3648 x 5472 | 1920 x 2880 |
- Multithreading
- Nearest Neighbor Algorithm
- imgscalr
- Graphics2D
- JCommander
Project is: finished
The project was created for educational purposes
Created by Gurianov Mark - feel free to contact me!