Extra compressie en afbeeldingen markeren als foto
This commit is contained in:
parent
90a36f831a
commit
b6f2c4d2b8
|
@ -6,20 +6,20 @@ if [ $# -eq 0 ]; then echo "Geef bestandsnaam op zonder extensie. michael-boelen
|
||||||
if [ -f "$1.png" ]; then
|
if [ -f "$1.png" ]; then
|
||||||
# 150
|
# 150
|
||||||
convert "$1.png" -resize 150x150 "$1-150x150.png"
|
convert "$1.png" -resize 150x150 "$1-150x150.png"
|
||||||
cwebp -q 80 "$1-150x150.png" -o "$1-150x150.webp"
|
cwebp -q 80 -m 6 -preset photo -sharp_yuv "$1-150x150.png" -o "$1-150x150.webp"
|
||||||
optipng -o7 "$1-150x150.png"
|
optipng -o7 "$1-150x150.png"
|
||||||
# 200
|
# 200
|
||||||
convert "$1.png" -resize 200x200 "$1-200x200.png"
|
convert "$1.png" -resize 200x200 "$1-200x200.png"
|
||||||
cwebp -q 80 "$1-200x200.png" -o "$1-200x200.webp"
|
cwebp -q 80 -m 6 -preset photo -sharp_yuv "$1-200x200.png" -o "$1-200x200.webp"
|
||||||
optipng -o7 "$1-200x200.png"
|
optipng -o7 "$1-200x200.png"
|
||||||
elif [ -f "$1.jpg" ]; then
|
elif [ -f "$1.jpg" ]; then
|
||||||
# 150
|
# 150
|
||||||
convert "$1.jpg" -resize 150x150 "$1-150x150.jpg"
|
convert "$1.jpg" -resize 150x150 "$1-150x150.jpg"
|
||||||
cwebp -q 80 "$1-150x150.jpg" -o "$1-150x150.webp"
|
cwebp -q 80 -m 6 -preset photo -sharp_yuv "$1-150x150.jpg" -o "$1-150x150.webp"
|
||||||
jpegoptim -m100 "$1-150x150.jpg"
|
jpegoptim -m100 "$1-150x150.jpg"
|
||||||
# 200
|
# 200
|
||||||
convert "$1.jpg" -resize 200x200 "$1-200x200.jpg"
|
convert "$1.jpg" -resize 200x200 "$1-200x200.jpg"
|
||||||
cwebp -q 80 "$1-200x200.jpg" -o "$1-200x200.webp"
|
cwebp -q 80 -m 6 -preset photo -sharp_yuv "$1-200x200.jpg" -o "$1-200x200.webp"
|
||||||
jpegoptim -m100 "$1-200x200.jpg"
|
jpegoptim -m100 "$1-200x200.jpg"
|
||||||
else
|
else
|
||||||
echo "Bestand niet gevonden. Geef bestand op zonder extensie."
|
echo "Bestand niet gevonden. Geef bestand op zonder extensie."
|
||||||
|
|
Reference in a new issue