3 ms·
My solution: https://github.com/vladstudio/Vladstudio-smart-resize-Bash-script https://github.com/vladstudio/Vladstudio-smart-resize-Bash-s... The biggest prob
by vladstudio 13y ago
My solution: https://github.com/vladstudio/Vladstudio-smart-resize-Bash-script https://github.com/vladstudio/Vladstudio-smart-resize-Bash-s...
The biggest problem of scaling down an image is to find right settings for resampling and sharpening. After many expreiments, I found it impossible to achieve good results by simply running convert with a line of arguments. So I came up with this script, which basically does the following:
* configures -interpolate bicubic -filter Lagrange;
* resizes source image 80%;
* applies -unsharp 0.44x0.44+0.44+0.008;
* repeats steps 2 & 3 until target size is reached.
- tszming 13y agoThis looks interesting, do you have any sample images for comparison?
- free 13y agoThis is fine if you have a limited set of images that you handpick and optimize. Do you have any suggestions when there are thousands of images and all this needs to be automated?
- natch 13y agoHe has an example at his github link where he uses a simple bash for loop to do many images at once.
- icebraining 13y agoUse GNU parallel: https://www.gnu.org/software/parallel/ https://www.gnu.org/software/parallel/ It can distribute the work across the available CPU cores, and it can even distribute the work across different machines using SSH: https://www.gnu.org/software/parallel/man.html#example__distributing_work_to_local_and_remote_computers https://www.gnu.org/software/parallel/man.html#example__dist...