made imagemagick python 3 compatible