Improved the KB about image scaling from CLI

This commit is contained in:
Michele Cereda
2022-08-24 12:12:21 +02:00
parent 9a3f79d3e6
commit 439d69883a
2 changed files with 18 additions and 0 deletions

View File

@@ -31,5 +31,7 @@ magick *.png out.pdf
## Sources
- [Converting Multiple Images into a PDF File]
- [How to Quickly Resize, Convert & Modify Images from the Linux Terminal]
[converting multiple images into a pdf file]: https://legacy.imagemagick.org/discourse-server/viewtopic.php?p=144157&sid=e7706233f81874af86ffbbf3e57b1e76#p144157
[how to quickly resize, convert & modify images from the linux terminal]: https://www.howtogeek.com/109369/how-to-quickly-resize-convert-modify-images-from-the-linux-terminal/

View File

@@ -0,0 +1,16 @@
# Resize images using the CLI
Leverages `convert` from `imagemagick`.
```sh
convert input.jpg -adaptive-resize 50% output.jpg
# Scale down all images in a folder.
ls -1 | xargs -I{} convert {} -adaptive-resize 50% {}_scaled.jpg
```
Further readings
- [imagemagick]
[imagemagick]: imagemagick.md