I followed this solution already given to same question: -fuzz 5% -fill magenta -draw 'color 0,0 floodfill' -transparent magenta result.png
but I must have failed it when I converted it to my workflow as it removes all white within the drawing as well. cd
cd desktop/drawings
magick mogrify -path ../drawings2 -format png -fuzz 40% -fill white -draw 'color 0,0 floodfill' -transparent white *.png
Here's a before/after with before a jpeg for size requirement.
[] [
]