Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Windows Meta File (WMF) support(new Image(display, "image.wmf") does not work in Eclipse Juno)
Windows Meta File (WMF) support [message #965911] Wed, 31 October 2012 15:58 Go to next message
Julia Kurde is currently offline Julia KurdeFriend
Messages: 66
Registered: November 2011
Location: Berlin, Germany
Member
Hi,

I just updated my Eclipse from Indigo to Juno.

Surprisingly the WMF file format seems not to be supported any more.
The constructor
Image image = new Image(Display.getDefault(), "image.wmf");

will throw an SWTException: Unsupported or unrecognized format.

With Eclipse Indigo there was no problem.

For my RCP application displaying WMF files is essential, so I really appreciate any ideas!
Re: Windows Meta File (WMF) support [message #968609 is a reply to message #965911] Fri, 02 November 2012 15:48 Go to previous message
Julia Kurde is currently offline Julia KurdeFriend
Messages: 66
Registered: November 2011
Location: Berlin, Germany
Member
I've just discovered the problem:

new Image(Display.getDefault(), "L:/image.wmf"); works, while
new Image(Display.getDefault(), "/L:/image.wmf"); does not work!

The second path string is returned by java.net.URL.getPath().

The exception that was thrown was a bit missleading!

*solved* Smile

By the way...
new Image(Display.getDefault(), "L:/image.gif"); and
new Image(Display.getDefault(), "/L:/image.gif"); both work!!

[Updated on: Fri, 02 November 2012 15:52]

Report message to a moderator

Previous Topic:Embedding SWT Browser in Equinox launched Swing App on MacOS
Next Topic:build SWT JNI library for Windows
Goto Forum:
  


Current Time: Sat Dec 20 08:04:04 GMT 2014

Powered by FUDForum. Page generated in 0.06329 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software