#
# -d changes the Ghostscript device used for creating PNG files
# (usually png16m for direct PNG creation and pngmono for printer simulation)
#
# -d changes the Ghostscript device used for creating PNG files
# (usually png16m for direct PNG creation and pngmono for printer simulation)
cpu_count=${CPU_COUNT:-1}
backend_opt='--png ${resolution:+=-dresolution=$resolution} ${gsdevice:+=-dpixmap-format=$gsdevice}'
cpu_count=${CPU_COUNT:-1}
backend_opt='--png ${resolution:+=-dresolution=$resolution} ${gsdevice:+=-dpixmap-format=$gsdevice}'
if [ -z "$file_loc" ]; then
echo "Must specify old (-o) or new (-n) regtest PNG creation on command line"
exit 1
if [ -z "$file_loc" ]; then
echo "Must specify old (-o) or new (-n) regtest PNG creation on command line"
exit 1
rm -rf $LILYPOND_BUILD_DIR/out-png-check/$file_loc
mkdir -p $LILYPOND_BUILD_DIR/out-png-check/$file_loc
rm -rf $LILYPOND_BUILD_DIR/out-png-check/$file_loc
mkdir -p $LILYPOND_BUILD_DIR/out-png-check/$file_loc
$LILYPOND_BUILD_DIR/out/bin/lilypond $(eval echo $backend_opt) --relocate \
-dinclude-settings=$LILYPOND_GIT/scripts/auxiliar/NoTagline.ly \
-djob-count=$cpu_count -dread-file-list "dir.txt"
$LILYPOND_BUILD_DIR/out/bin/lilypond $(eval echo $backend_opt) --relocate \
-dinclude-settings=$LILYPOND_GIT/scripts/auxiliar/NoTagline.ly \
-djob-count=$cpu_count -dread-file-list "dir.txt"
convert new-regtest-results/$trimFile -level 50% NewTest.png
convert old-regtest-results/$trimFile -level 50% OldTest.png
difference=$(compare -metric AE NewTest.png OldTest.png null: 2>&1 )
convert new-regtest-results/$trimFile -level 50% NewTest.png
convert old-regtest-results/$trimFile -level 50% OldTest.png
difference=$(compare -metric AE NewTest.png OldTest.png null: 2>&1 )