update: image compress support size units

This commit is contained in:
Sam Hadow
2026-03-25 15:07:08 +01:00
parent 25ca834aee
commit ba336aaf14
2 changed files with 30 additions and 4 deletions
+2 -1
View File
@@ -42,8 +42,9 @@ kill every wine process including processes hanging
convert animated .webp at $1 (path) to a gif
### image_compress.sh
Usage: `./image_compress.sh <input> <output.jpg> <size in bytes>`
Usage: `./image_compress.sh <input> <output.jpg> <target size>`
Compress an image until it's below a specified target size. Output format is JPEG, regardless of the input format.
The target size can be without unit (default to bytes). Or in B, KB or MB, for bytes, kilo bytes and mega bytes (not case sensitive).
(requires ImageMagick)
### convert_md_to_pdf.sh