WMF -> JPEG - text and borders missing

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
bandsonly.com

WMF -> JPEG - text and borders missing

Post 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!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: WMF -> JPEG - text and borders missing

Post by magick »

We tried your command and it returned the expected results. We are using ImageMagick 6.5.1-3, the current release.
bandsonly.com

Re: WMF -> JPEG - text and borders missing

Post 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!
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: WMF -> JPEG - text and borders missing

Post 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
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply