From e097f514b747e2ba44b3b863ce60d58c727f9e97 Mon Sep 17 00:00:00 2001 From: Sam Hos Date: Mon, 3 Feb 2025 13:39:52 +0100 Subject: [PATCH] imagemagick batch conversion --- docs/Assignments/bootcamp/ImageMagick.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/Assignments/bootcamp/ImageMagick.md b/docs/Assignments/bootcamp/ImageMagick.md index 1d63bde..f48c4ed 100644 --- a/docs/Assignments/bootcamp/ImageMagick.md +++ b/docs/Assignments/bootcamp/ImageMagick.md @@ -33,6 +33,13 @@ convert input.jpg -resize 20% small.jpg ``` Where 20% is placed you could also place anything else, For example 800x800 or just 800x then it will keep the aspect ratio. +### Batch conversion +For this project I take a lot of pictures and I don't wanna convert them one by one so i use this command to convert them all at the same time. Warning: It overwrites the files so make backups. + +```bash +mogrify -size 800x -strip -quality 85% -format jpg *.png +``` + ## Rules for uploading images to git Use jpg's instead of png. Jpg's are compressed and way smaller. Try to keep images under 200 kilobytes.