Memoize result of identify command in order to avoid multiple calls to ImageMagick