diff --git a/knowledge base/imagemagick.md b/knowledge base/imagemagick.md index 0eaa30c..8f6b49d 100644 --- a/knowledge base/imagemagick.md +++ b/knowledge base/imagemagick.md @@ -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/ diff --git a/knowledge base/resize an image from cli.md b/knowledge base/resize an image from cli.md new file mode 100644 index 0000000..35f6e94 --- /dev/null +++ b/knowledge base/resize an image from cli.md @@ -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