This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env -S unshare --mount --map-root-user /bin/sh | |
# Licensed under the Zero-Clause BSD terms: https://opensource.org/license/0bsd | |
## Requires `imagemagick` and `cavif` | |
## -C: Fail if redirects try to overwrite an existing file. | |
## -e: Fail if any command fails (with exceptions). | |
## -u: Fail if an unset variable tries to be expanded. | |
## -f: No glob expansion. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env -S unshare --mount --map-root-user /bin/sh | |
# Licensed under the Zero-Clause BSD terms: https://opensource.org/license/0bsd | |
# Requires: imagemagick & [sisyphus](https://gist.github.com/Winterhuman/21d7b148db40ff041f397b07a7aafb83) | |
# | |
# Argument 1: Number of pixels to fill, required | |
# Argument 2: Height ratio, default 23 | |
# Argument 3: Width ratio, default 5 | |
set -Ceuf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Explanation | |
PNGQuant: `pngquant --quality 100-100 --speed 1 --strip` | |
OxiPNG: `oxipng --opt max --strip all --alpha` | |
OxiPNG-ZF: `oxipng --opt max --strip all --alpha --zopfli` | |
Oxi-Quant: "PNGQuant" > "OxiPNG" (non-ZF) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env -S unshare --pid --mount-proc --kill-child --map-root-user /bin/sh | |
# Licensed under the Zero-Clause BSD terms: https://opensource.org/license/0bsd | |
## Requires pngquant, oxipng, gifsicle, gif2apng, and optionally libwebp & | |
## perl-image-exiftool | |
## -C: Fail if redirects try to overwrite an existing file. | |
## -e: Fail if any command fails (with exceptions). | |
## -u: Fail if an unset variable tries to be expanded. |