diff --git a/readme.md b/readme.md index 88a91b4..25ec08b 100644 --- a/readme.md +++ b/readme.md @@ -36,6 +36,8 @@ to only print a report: - [`file`](https://darwinsys.com/file/) - to determine file type - [`sd`](https://github.com/chmln/sd) – better sed - [`jpegoptim`](https://github.com/tjko/jpegoptim) – to compress JPEGs +- [`imagemagick`](https://imagemagick.org/) + or [`graphicsmagic`](http://www.graphicsmagick.org/) – to mogrify PNGs - [`pngcrush`](https://github.com/Kjuly/pngcrush) – to compress PNGs diff --git a/rename-ext.sh b/rename-ext.sh index cfe04da..191596c 100755 --- a/rename-ext.sh +++ b/rename-ext.sh @@ -17,6 +17,7 @@ # - file - to determine file type # - `cargo install sd` – better sed # - jpegoptim – to compress JPEGs +# - imagemagick or graphicsmagic – to mogrify PNGs # - pngcrush – to compress PNGs (losless) # // - pngquant – to compress PNGs (lossy) @@ -25,7 +26,7 @@ ALL_EXTS=`echo \ |eps|tga|tiff?|psd|ico|xcf|heic |eot|otf|ttf|epub|doc|docx|xls|swf|pdf|odt |flac|opus|ogg|m4a|wav - |mpe?g|mp\d|mov|mkv|avif?|asf|3gpp? + |mpe?g|mp\d|mov|mkv|avif?|asf|3gpp?|av1 |html?|sh|py|php ' \ | tr -d '[:space:]' \ @@ -232,6 +233,7 @@ for FILENAME in "$@"; do 'image/jp2') rename_ext "$FILENAME" 'jp2' ;; 'image/png') rename_ext "$FILENAME" 'png' ;; 'image/webp') rename_ext "$FILENAME" 'webp' ;; + 'image/avif') rename_ext "$FILENAME" 'avif' ;; # vector-based 'image/svg+xml') rename_ext "$FILENAME" 'svg' ;;