Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Gimp Batch Converting WMF to PNG

866 views
Skip to first unread message

andrew

unread,
Jun 22, 2010, 10:29:23 AM6/22/10
to
I was wondering if there are any scripts that can convert a directory
and all the files in it's sub directories from WMFs to PNGs. If there
are any could someone please give a link or copy of the code, or if
someone could be kind enough to make one, it would be greatly
appreciated.

John K. Herreshoff

unread,
Jun 22, 2010, 10:37:59 AM6/22/10
to
andrew wrote:

Check out image magic: try this link to whet your appetite.

http://www.imagemagick.org/script/convert.php

John.

--
Using the jch_box.

rich

unread,
Jun 22, 2010, 2:50:54 PM6/22/10
to

Helps if you give more info - Which OS (guessing windows) and maybe the
source of the files for conversion (CD or hdd)

As the other post Imagemagick will convert relatively easily albeit from
command line.
If you change to a folder and do a command

convert *.* file.png

all the graphic files are converted and copied to new files file-0.png,
file-1.png etc. But no sub folders.

Keeping the file names is a bit harder. In linux this bash file works and
recursively acts on sub-folders. Obviously there is a problem if the
files are on a CD.

#!/bin/bash
find . -name "*.wmf" | while read fname ; do
echo "Doing: $fname"
convert "$fname" "${fname%%wmf}png"
done

Don't know what the equivalent batch file in windows might be.

So for Gimp there is 'Daves Batch Processor'. (There is a windows version
but I have not tried it)

http://members.ozemail.com.au/~hodsond/dbp.html

This does work with a couple of provisions. One folder at a time, unless
you want all the input to one destination. The Linux version does not
make destination folders, (so make them in advance.) Otherwise its select
all the files in a folder, set the destination with 'rename', set the
'output' format, hit 'start' and it converts.

Maybe for windows something like IrfanView, which is not my favourite
application by a long way, might be worth a look.

best of luck

--
rich

rich

unread,
Jun 23, 2010, 9:49:52 AM6/23/10
to
On Tue, 22 Jun 2010 07:29:23 -0700, andrew wrote:

Had a bit of spare time so a windoze solution.
I did try Davids Batch Processor on a (virtual) XP machine with Gimp and
it does work.

Again guessing you are using windows and probably have lots of images on
a CD.

This is an imagemagick solution so go get imagemagick from
<http://www.imagemagick.org/download/binaries/ImageMagick-6.6.2-7-Q8-
windows-dll.exe>
when it asks make sure it puts itself in the 'path'.

Rather than use the 'convert' command, 'mogrify' will keep the file name.
You have to be very careful with mogrify as it can and will overwrite
your source files, however in this case no such worry.
the general command for conversion is mogrify -convert <output format>
<input files>

In windows you can use a command line which will recurse sub-folders.

for /r %x in (*.wmf) do mogrify -convert png "%x"

A few screen shots to help you on your way. Not perfect but a start.

http://www.imageno.com/5233m8l5uvntpic.html

0 new messages