Page 2 of 2
Re: EMF conversion error error/emf.c/ReadEMFImage/753
Posted: 2016-01-15T14:28:04-07:00
by fmw42
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.
A few command lines or script can determine that from the identify -verbose information or string formats and fx calculations.
Re: EMF conversion error error/emf.c/ReadEMFImage/753
Posted: 2016-01-15T16:04:58-07:00
by snibgo
Except that identify can't read this file:
Code: Select all
f:\web\im>%IM%identify 00010003_1247.emf
identify.exe: UnableToReadImageData `00010003_1247.emf' @ error/emf.c/ReadEMFImage/753.
It can be read with a low density such as:
Code: Select all
convert -density 20 00010003_1247.emf g.png
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.
Re: EMF conversion error error/emf.c/ReadEMFImage/753
Posted: 2016-01-15T16:15:19-07:00
by dlemstra
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
Posted: 2016-01-26T05:45:06-07:00
by chri
@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
Re: EMF conversion error error/emf.c/ReadEMFImage/753
Posted: 2016-01-26T05:49:22-07:00
by dlemstra
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
Posted: 2016-03-03T04:22:24-07:00
by chri
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
Posted: 2016-03-05T09:54:50-07:00
by dlemstra
I now have an even better solution. In the next version of ImageMagick (6.9.3-7) you will be able to do this:
Code: Select all
convert -size 3307x 00010003_1247.emf -density 300 -units PixelsPerInch 00010003_1247.png
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.