Is there a way to do this, maybe somehow parsing the data given from the code below?
Code: Select all
convert sample.png -format %c histogram:info:-
Code: Select all
convert sample.png -format %c histogram:info:-
Code: Select all
test1=`convert image -alpha off -scale 1x1 -format "%[fx:u]" info:`
if [ "$test1" = "1" ]; then
echo "white"
else
echo "non-white"
fi
Code: Select all
test2=`convert image -alpha extract -scale 1x1 -format "%[fx:u]" info:`
if [ "$test1" = "1" ]; then
echo "fully opaque"
else
echo "has transparency"
fi