removed img attribute from Contour class