Remove dependency on imagemagick