Home: Perl Programming Help: Intermediate:
Converting image to WMF

New User

Nov 28, 2017, 2:50 AM

Views: 4029
Converting image to WMF

I need to convert some JPG images into WMF format. I'm attempting to do so using GD but am a bit confused. The Image::Base::GD man page says it can save in WMF format but when I try this..

$wmf = Image::Base::GD->new(-file => $file); 
$wmf->set(-file_format => 'wmf');

.. I get ..

Can't locate object method "wmf" via package "GD::Image"

I'm probably being stupid but if someone could point out where I'm going wrong (or an alternative command-line tool which will do the job - ImageMagick can read WMF but not write them) it'd be appreciated.

Veteran / Moderator

Nov 28, 2017, 8:59 AM

Views: 4025
Re: [gaspode] Converting image to WMF

I don't know this module, but I would assume you might need to install the Image::WMF module on your computer and to add the following line to your program:

use Image::WMF;

New User

Nov 28, 2017, 9:33 AM

Views: 4021
Re: [Laurent_R] Converting image to WMF

That was the first thing I tried. No joy :(