Evaluated proc ansi:wand2ansi wand { set ok [chunk [nsplit [magic:getpixel $wand 0 0 [mm $wand width] [mm $wand height] RGB] 6] [mm $wand width]]; join [map $ok {y { join [map $y {x { set c [ansi:closest $x $::ansi_palette]; . [^C]$c,${c}XX }}] "" }}] \n }