10-18-2019, 02:37 PM
From my memos, a Color-to-alpha in IM:
(The backslashes ensure that the parens are passed to IM and not interpreted by the shell.)
Code:
convert infile.png \( -clone 0 -fill "#ffffff" -colorize 100 \) \( -clone 0,1 -compose difference -composite -separate +channel -evaluate-sequence max -auto-level \) -delete 1 -alpha off -compose over -compose copy_opacity -composite outfile.png
(The backslashes ensure that the parens are passed to IM and not interpreted by the shell.)