switch to using ImageMagick to identify the incoming image format. simplifications