diff options
Diffstat (limited to 'content/notes/2023-06-04-bulk-make-thumbnails.md')
| -rw-r--r-- | content/notes/2023-06-04-bulk-make-thumbnails.md | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/content/notes/2023-06-04-bulk-make-thumbnails.md b/content/notes/2023-06-04-bulk-make-thumbnails.md new file mode 100644 index 0000000..d3a7d62 --- /dev/null +++ b/content/notes/2023-06-04-bulk-make-thumbnails.md | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | --- | ||
| 2 | title: "Bulk thumbnails" | ||
| 3 | url: /bulk-make-thumbnails.html | ||
| 4 | date: 2023-06-04T20:46:56+02:00 | ||
| 5 | type: note | ||
| 6 | draft: false | ||
| 7 | --- | ||
| 8 | |||
| 9 | Make bulk thumbnails of JPGs with ImageMagick. | ||
| 10 | |||
| 11 | ```sh | ||
| 12 | #!/bin/bash | ||
| 13 | |||
| 14 | directory="./images/" | ||
| 15 | dimensions="360x360" | ||
| 16 | |||
| 17 | for file in "$directory"*.jpg; do | ||
| 18 | convert "$file" -resize $dimensions "$file" "${file%.*}-thumbnail.jpg" | ||
| 19 | done | ||
| 20 | ``` | ||
