#! /bin/bash # Last edited on 2024-04-01 17:26:23 by stolfi # Tests wether the PBMPLUS file "$3" has # width and height proportional to "$1" and "$2". # Returns status=0 if false, status=1 if true if [[ ( $# -lt 2 ) || ( $# -gt 3 ) ]]; then echo "usage: $0 [ ] " exit 1 fi if [[ $# -eq 2 ]]; then fxy=( `get-pnm-dimensions` ) else fxy=( `get-pnm-dimensions $3` ) fi # echo "get-pnm-dimensions = ${fxy[*]}" compare-ratios $1 $2 $fxy[1] $fxy[2] # exit 1