[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: How to convert to Standard WMF?
From: Nicolas Goutte <nicolasg () snafu ! de>
Date: 2003-01-03 15:41:23
[Download RAW message or body]
Good question! ;-)
The KOffice WMF source files are at
koffice/lib/kwmf/*
koffice/ib/kofficecore/koPictureWmf.*
For anything QImage-based, I suppose that it should be not too difficult.
You have to reverse QWinMetaFile::dibBitBlt (in the file koffice/kwmf/qwmf.cc)
(See the KWord's AbiWord, HTML and RTF export filters for picture code, mostly
to PNG, JPEG and SVG.)
The problems are as always: EPS, QPicture and SVG.
For EPS, you can convert it to a bitmap easily. For the other metafile
formats, you can use KoPicture::generatePixmap. (A new method for KoPicture
to get a QImage whetever the internal file format of KoPicture is planned but
not yet done.)
If you want to convert the metafiles 1:1, it gets more complex. For EPS, I
have no idea how to do it (probably a new driver for GhostScript.) For
QPIcture (and therefore also for SVG), you would probably have to use the
same trick as for saving SVG from QPicture. The problem is that QSvgDevice
uses many non-document features of QT to be able to work. .-(
So that is what I know about exporting to WMF. May be I have missed easier
ways.
Have a nice day/evening/night!
On Saturday 04 January 2003 00:00, Clarence Dang wrote:
> Hi,
>
> How do I convert a picture to a "Standard Windows Metafile" for a KWord
> export filter (in code, not via the GUI)?
>
> Thanks,
> Clarence
>
>
> _______________________________________________
> koffice-devel mailing list
> koffice-devel@mail.kde.org
> http://mail.kde.org/mailman/listinfo/koffice-devel
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic