Perhaps I am doing something wrong. But I get wrong results using -floodfill vs -draw "color ... floodfill"
Input:

This works fine using -draw whether gif or png output:
infile="boxes.gif"
coords=`convert $infile -format "%[fx:w/2],%[fx:h/2]" info:`
echo $coords
convert $infile -fuzz 1% -fill white -draw "color $coords floodfill" boxes_flood2.gif

infile="boxes.gif"
coords=`convert $infile -format "%[fx:w/2],%[fx:h/2]" info:`
echo $coords
convert $infile -fuzz 1% -fill white -draw "color $coords floodfill" boxes_flood2.png

But this does not seem to work (using either gif or png). Perhaps I am doing something wrong or misinterpretting http://www.imagemagick.org/script/comma ... #floodfill
infile="boxes.gif"
coords=`convert $infile -format "+%[fx:w/2]+%[fx:h/2]" info:`
echo $coords
convert $infile -fuzz 1% -floodfill $coords white boxes_flood1.gif

infile="boxes.gif"
coords=`convert $infile -format "+%[fx:w/2]+%[fx:h/2]" info:`
echo $coords
convert $infile -fuzz 1% -floodfill $coords white boxes_flood1.png
