Re: Displaying Windows Metafiles
Posted by Chris Uppal-3 on May 27, 2004; 2:27pm
URL: https://forum.world.st/Displaying-Windows-Metafiles-tp3370663p3370664.html
Runar Jordahl wrote:
> Does anyone have available code that displays (on screen) a Windows
> metafile (WMF file) or enhanced metafile (EMF file)? Would this be easy
> to do in Dolphin?
You can use an ImagePresenter with its 'Basic view' (an ImageView), and its
value set to an OLEPicture from the file. E.g.
file := 'whatever.wmf'.
picture := OLEPicture fromFile: file.
ImagePresenter show: 'Basic image' on: picture.
I'm not sure if that works properly with EMF files -- I've only got one, and it
looks a bit odd (but maybe it's meant to). You can also try the gdiplus
library which has been mentioned in this group before (check the archives
and/or Google), which has a better image viewer (although there seems to be
something strange about the way it thinks that WMF images are much bigger than
everyone else does).
-- chris