Converted image drawing to use pycairo

This has lead to a speed up in the drawing function.
There may be a possiblity of converting the comparison to use numpy
arrays for a speedup