image-compressor/test.sh

13 lines
261 B
Bash
Executable File

#!/bin/bash -e
CONVERT=(convert)
if command -v gm > /dev/null; then
CONVERT=(gm "${CONVERT[@]}")
fi
mkdir -p test test_1080p
"${CONVERT[@]}" -size 3840x2160 xc:black test/000.png
printf '%s\n' {001..127} | xargs -P0 -I'{}' cp test/000.png test/'{}'.png