Page 1 of 1

WMF -> JPEG - text and borders missing

Posted: 2009-04-17T09:55:44-07:00
by bandsonly.com
Hello

I have many WMFs which are surrounded by whitespace. I wish to strip off the space, then enlarge the images on-the-fly to a max of 800px wide by 600px high. The command I have run is:

Code: Select all

/usr/bin/convert -density 360 -trim +repage -resize 800x600 -quality 85 (source) (destination)
The whitespace trimming and image enlargement seem OK, the problem is that the text and stroke lines all disappear after conversion, meaning I'm left with just a block of colour with no details.

The original WMF is at http://www.bandsonly.com/images/temp/original.wmf and the resulting jpeg at http://www.bandsonly.com/images/temp/converted.jpg.

I am on a UNIX box running ImageMagick 6.2.8.

Hope someone can help!

Re: WMF -> JPEG - text and borders missing

Posted: 2009-04-17T10:45:16-07:00
by magick
We tried your command and it returned the expected results. We are using ImageMagick 6.5.1-3, the current release.

Re: WMF -> JPEG - text and borders missing

Posted: 2009-04-18T03:29:06-07:00
by bandsonly.com
Thanks for letting me know. In the end I upgraded IM (removed ImageMagick via yum, then compiled from source. Guide here).

I also converted to gif rather than jpeg. My final command was:

Code: Select all

/usr/local/bin/convert -density 144 -trim +repage -resize 800x600  (src).wmf (dest).gif
Hope this helps someone!

Re: WMF -> JPEG - text and borders missing

Posted: 2009-04-22T21:44:38-07:00
by anthony
You should read your image immediately after your -density setting. that way you are performing all the image operations, including the read, in the correct order, and not reling on the IM legacy handler to figure out just what you really want to do.


If instead of directly installing IM from the tar sources, you can have those tar sources generate a SRPM and from that RPM packages build specifically for your machine.

See http://www.imagemagick.org/Usage/api/#building