imagemagick batch conversion

This commit is contained in:
2025-02-03 13:39:52 +01:00
parent e9e15e6996
commit e097f514b7

View File

@@ -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.