LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-06-2011, 09:22 PM   #1
RockyRed
LQ Newbie
 
Registered: Jul 2003
Location: Auckland NZ
Distribution: Ubuntu10.04
Posts: 8

Rep: Reputation: 1
Unhappy After Mint 10 install Gimp will not load *.wmf's


Since installing Mint 10 (julia) Gimp refuses to load *.wmf

Note The same wmf s are viewable in libreoffice write

Using terminal to launch gimp and trying to load a wmf results in:

The render WMF dialog shows -1 x -1 with width 1 and height 1.
Changing the width and height does not seem to help.
The X and Y ratios both show -262144.0000 and are not changeable.

Clicking OK results in a Gimp Message:

opening (path etc .wmf) failed:
could not open (path etc .wmf) for reading

The terminal has the following after this:

ERROR: font.c (1334): wmf_ipa_font_map: failed to load *any* font!

(file-wmf:18611): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion `width >= -1' failed
ERROR: font.c (1334): wmf_ipa_font_map: failed to load *any* font!

(file-wmf:18611): LibGimpWidgets-CRITICAL **: gimp_preview_area_draw: assertion `buf != NULL' failed
ERROR: font.c (1334): wmf_ipa_font_map: failed to load *any* font!

Normally I can find an answer to a problem by a bit of googling but not in this case.

Addendum
I have now found that libre office writer no longer previews wmfs but they can be seen after insertion. This rather annoying as I cant see what I want to insert.

Last edited by RockyRed; 05-07-2011 at 04:22 PM. Reason: further wmf problems
 
Old 05-07-2011, 04:43 PM   #2
penguiniator
Member
 
Registered: Feb 2004
Location: Olympia, WA
Distribution: SolydK
Posts: 442
Blog Entries: 3

Rep: Reputation: 60
This may not be the answer you are looking for, but WMF is a vector format and GIMP is a raster editor. GIMP is not the right program for this. Inkscape is, and should be able to open WMF files without issues.
 
0 members found this post helpful.
Old 05-07-2011, 05:09 PM   #3
RockyRed
LQ Newbie
 
Registered: Jul 2003
Location: Auckland NZ
Distribution: Ubuntu10.04
Posts: 8

Original Poster
Rep: Reputation: 1
No this is not the answer I am looking for. Previously the gimp allowed selection of the size to open the file at. That is in its own none vector format. Something is corrupted or missing now. There is now no preview in libre office or the gimp nor in inkscape which I just installed. Inkscape opens wmfs without problem though just as libre office draw does.
Previously I had kde and all these wmfs ended up with thumbnails which they do not have now under gnome. Maybe its a gtk issue.
As a work around I have installed a wmf viewer under wine which allows quick previewing of wmfs.
Also If I want to edit one of these files in the gimp I can convert it with hijack pro under wine to another format but this does not let you choose the size for conversion - which the gimp did before - so you loose detail.
 
Old 12-31-2011, 03:26 AM   #4
miriam-e
LQ Newbie
 
Registered: Nov 2011
Location: QLD, Australia
Distribution: Puppy Linux
Posts: 13

Rep: Reputation: Disabled
workaround for problem with libwmf convert

I've just come up against the same problem in Puppy Lucid (which uses Ubuntu lucid lynx installables). A google search found that the problem lies in defoma, which libwmf relies upon. It seems this is a very old problem indeed and I'm surprised it hasn't been fixed. There is a workaround though which can allow you to convert the wmf files to svg, which a vector format that can be loaded by Gimp.

The libwmf-bin install gives 5 small programs, one of which is wmf2svg.

Code:
wmf2svg --wmf-fontdir=/usr/share/fonts/type1/gsfonts  file.wmf  file.svg

Last edited by miriam-e; 12-31-2011 at 07:11 AM.
 
1 members found this post helpful.
Old 12-31-2011, 08:20 PM   #5
RockyRed
LQ Newbie
 
Registered: Jul 2003
Location: Auckland NZ
Distribution: Ubuntu10.04
Posts: 8

Original Poster
Rep: Reputation: 1
Thanks miriam-e but the work around does not seem to work for my setup.

But I have arch linux on my laptop now. The gimp loads .wmf under arch.

My current main problem is wanting to see the images before I insert them into
a document.
Libre office loads .wmf but will not preview them on arch or mint.
Open office will preview wmf but arch linux no longer supports it.
I have open office on my desktop so its not such a problem now.

wmf2svg does not seem to work on my desktop under mint. It does work under arch
linux on my laptop. Originally my wmf files were printhouse cmx files. I
converted these to wmf using an old copy of hijackpro under wine. This did
a superb conversion (but svg was not an option). I tried converting a wmf file
with imagemagick but the conversion was very poor - maybe I did not use the right options.
wmf2svg works well enough but the files increase in size by a factor of 10 and there
are discrepancies in the conversion. Because of the number of files involved and the varying
nesting of directories I would have to write a script to conveniently do the conversion.
As long as I can use open office to preview the scripts on my desktop I expect I will not
bother to convert all these wmfs. (Unless I come across a really good conversion program.)
 
1 members found this post helpful.
Old 01-01-2012, 12:54 AM   #6
miriam-e
LQ Newbie
 
Registered: Nov 2011
Location: QLD, Australia
Distribution: Puppy Linux
Posts: 13

Rep: Reputation: Disabled
Thanks RockyRed. Very interesting that it works under Arch Linux.

Size doesn't matter with svg because it is a vector format (like wmf). You can open it in a text editor and alter the default view size. I can't remember which tag that is. Or load it into inkscape, resize and resave it.

I noticed that sometimes wmf2svg sometimes doesn't convert properly. It doesn't happen very often (at least in the files I have) but it is still annoying.

I converted directories full of hundreds of files in one go by simply running this little script from inside that directory:
Code:
#! /bin/sh

for wmffile in *.WMF
do
	wmf2svg --wmf-fontdir=/usr/share/fonts/type1/gsfonts $wmffile >$wmffile.svg
done
Of course it expects that the files' extensions are in capitals, but you can repeat the same code replacing the appropriate line with for wmffile in *.wmf if you have files with lowercase extensions.

I should have mentioned that I was able to get ImageMagick to work by editing
Code:
/usr/local/lib/ImageMagick-6.6.6/config/delegates.xml
Searching for "wmf" in the file I found a command template for wmf2eps. I found wmf2svg to be a bit more reliable than wmf2eps so I changed the line to
Code:
<delegate decode="wmf" command="&quot;wmf2svg&quot; --wmf-fontdir=/usr/share/fonts/type1/gsfonts -o &quot;%o&quot; &quot;%i&quot;"/>
Cheers,

Miriam

Last edited by miriam-e; 01-01-2012 at 01:05 AM. Reason: added a bit more info
 
1 members found this post helpful.
Old 01-06-2012, 10:17 PM   #7
RockyRed
LQ Newbie
 
Registered: Jul 2003
Location: Auckland NZ
Distribution: Ubuntu10.04
Posts: 8

Original Poster
Rep: Reputation: 1
Thanks again miriam-e

This script works on my desktop but I notice it results in *.WMF.svg so I modified it to remove the .WMF

#! /bin/sh

for wmffile in *.WMF
do
wmf2svg --wmf-fontdir=/usr/share/fonts/type1/gsfonts $wmffile > `basename $wmffile WMF`svg

done

My wmfs are in about 200 directories some nested 2 deep so I will enclose this in another script I have which
will go into the directories. Needless to say this will all be done on a copy. Size is a slight consideration.
I notice that the resulting files are about 6x as big. My files occupy 125mg so after converting they will occupy
about 750mg which is ok.
 
  


Reply

Tags
gimp


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: GIMP Painter And GIMP Paint Studio Transform GIMP Into The Ultimate Painting Tool LXer Syndicated Linux News 0 02-08-2011 05:40 PM
Newbie with Mint/ Linux needs to install Clam AV in Mint after 4 Wdws Trogan attack BAKEAPPLEFARM Linux Mint 6 03-24-2010 08:38 PM
I Can't Load Gimp - I Get This Error... taurusx5 Linux - Software 4 09-23-2008 11:11 AM
Gimp will not load! ningbojoe Mandriva 2 01-05-2007 01:47 AM
Can I load GIMP in english ? (only gimp) Dark Carnival Linux - Software 4 09-17-2003 05:18 PM


All times are GMT -5. The time now is 09:08 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration