← Back to team overview

cuneiform team mailing list archive

rtf image embedding

 

While fixing rtf image output I found problem in OpenOffice and embedded documents.

There are 2 modes in the engine - default one is to save all graphics in WMF format (using CreateMetaFile, etc...), it fail because we have no such functions at all. And second one is for save it as-is, in DIB format. Second mode was very untested, and was not standard compliant. RTF specification require that you are using dibitmap0 type and then wbmbitspixel, wbmplanes, wbmwidthbytes to specify bitmap settings (that was fixed by me). And then it require to store bitmap WITHOUT file header.

Here is a problem. Such files are perfectly opened in m$ word viewer (under wine) and in freeware rtf editors, but they fail to open in OO. When i`m adding bitmap file header - situation is absolutely different - it works in openoffice, and only in it. Other programs are unable to display such documents.

I tried to save document with embedded image in OO to rtf file. It uses png for output and this work fine in all the program. But to get png from bmp we should depend on pnglib or imagemagick. I will fill bug for openoffice, but i think that we should use some solution until OO team fix this.



Follow ups