arq-front_image-dithered/scripts/dither_nb.sh
2025-08-12 13:46:49 +02:00

12 lines
No EOL
546 B
Bash
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# YOUHAVETOINSTALLIMAGEMAGICKONLINUXTORUNTHISSCRIPT. (SEE the .bat script for Windows)
# Source : https://site.sarahgarcin.com/web-frugal/#images
# USE :
# 1- place the dither_nb.sh in a folder with your images.
# 2- Make sure the .sh is executable.
# 3- Double-click: Its done !
# TODO : Test this script on linux. (if you have tested it and it works, let me know !)
for img in *.jpg;
do convert "$img" -resize 400x400 -strip -quality 86 -colorspace Gray -dither FloydSteinberg -colors 4 "dither_$img";
done