marley: added kd-tree for more efficient color lookup
marley: nicer (probably faster) image blitting