I've attached a patch which I believe fixes the issue. The problem appears to be that, when imagemagick is installed and the image width is unset, that the image will be created by an elisp expression like (create-file "some/image.png" 'imagemagick nil :width nil) which doesn't work, maybe because imagemagick tries to create a 0-width image. The attached patch reverts to the old behavior of only using imagemagick when width is non-nil, fixing the bug introduced by 48da60f47.