A few command lines or script can determine that from the identify -verbose information or string formats and fx calculations.dlemstra wrote:That won't work Fred. The issue is that the @chri needs to know the density that can be used to create a 3307x image. The big image can only be read if a 'low enough' density is specified. The issue is that @chri wants to figure out the best density.
EMF conversion error error/emf.c/ReadEMFImage/753
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: EMF conversion error error/emf.c/ReadEMFImage/753
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: EMF conversion error error/emf.c/ReadEMFImage/753
Except that identify can't read this file:
It can be read with a low density such as:
Then g.png can be identified. If g.png isn't large enough, convert can be re-run with a larger density.
It's a kludge. We shouldn't have to write a script that reads a file to find out how to read it. I don't know if "identify -ping" could be tweaked to successfully find the dimensions of this image.
Code: Select all
f:\web\im>%IM%identify 00010003_1247.emf
identify.exe: UnableToReadImageData `00010003_1247.emf' @ error/emf.c/ReadEMFImage/753.
Code: Select all
convert -density 20 00010003_1247.emf g.png
It's a kludge. We shouldn't have to write a script that reads a file to find out how to read it. I don't know if "identify -ping" could be tweaked to successfully find the dimensions of this image.
snibgo's IM pages: im.snibgo.com
Re: EMF conversion error error/emf.c/ReadEMFImage/753
Thanks for the idea @snibgo. We could automate limiting the width and height of the image but then we need to know what the actual limit is. I will try and see if we can figure out the limit.
Re: EMF conversion error error/emf.c/ReadEMFImage/753
@dlemstra did you find a way to automate the limiting of the density with which the image is read to the max. possible value?
e.g. convert -units PixelsPerInch -density max %1 -resize 3307x -density 300 %1.jpg
e.g. convert -units PixelsPerInch -density max %1 -resize 3307x -density 300 %1.jpg
Re: EMF conversion error error/emf.c/ReadEMFImage/753
I have an idea how to do this but I haven't had the time to implement it.
Re: EMF conversion error error/emf.c/ReadEMFImage/753
any news on this - I'd still be very happy if this feature would be implemented
Re: EMF conversion error error/emf.c/ReadEMFImage/753
I now have an even better solution. In the next version of ImageMagick (6.9.3-7) you will be able to do this:
When you specify -size the density will be calculated. With the example above it will make sure the maximum width is 3307 pixels. When you specify both with and height (e.g. 3307x3307) the image will fit inside those bounds. For your image the size will become 3307x869.
Code: Select all
convert -size 3307x 00010003_1247.emf -density 300 -units PixelsPerInch 00010003_1247.png