File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131 mkdir decoded
3232 CMD="../Example/CLI.xcarchive/Products/usr/local/bin/SDWebImageAVIFCoder_Example CLI"
3333 for file in $(find . -name \*.avif); do
34- "${CMD}" ${file} "./decoded/${file}.png"
34+ file=$(basename ${file})
35+ "${CMD}" "${file}" "./decoded/${file}.png"
36+ done
37+ - name : Install imagemagick to compare images.
38+ shell : bash
39+ run : brew install imagemagick
40+ - name : Compare images
41+ shell : bash
42+ run : |
43+ set -ex
44+ cd avif-sample-images
45+ for file in $(find . -name \*.avif); do
46+ file=$(basename ${file})
47+ if (cat ${file} | grep "\(monochrome\|crop\|rotate\|mirror\)"); then
48+ # FIXME(ledyba-z): Check them.
49+ echo "Ignore: ${file}"
50+ continue
51+ else
52+ score=$(compare -metric PSNR "${file}" "decoded/${file}.png")
53+ echo " * ${file}: ${score}"
54+ if test $(echo "${score} >= 30.0" | bc -l) -eq 0; then
55+ exit -1
56+ fi
57+ fi
3558 done
You can’t perform that action at this time.
0 commit comments