Comsol Python Image Manipulation