Apache OpenOffice (AOO) Bugzilla – Issue 11017
Fails to load some RTF files containing 8bit BMP Images
Last modified: 2013-08-07 14:41:36 UTC
Some RTF files containing 8bit BMP images (and nothing else) fail to load in Writer yet the same files load into MS Word 2000 and MS Word 97. In each case OOo does not produce an error - it just gives a blank page. RTF files containing 24bit BMPs work perfectly. I have experimented with a number of different files containg images of different sizes and containing different numbers of colours. I will attach some examples that work and some that do not. Please let me know if I can try anything further.
Created attachment 4464 [details] RTF File that fails to load in Writer
Created attachment 4465 [details] broken.rtf loaded into MS Word, then saved out again
Created attachment 4466 [details] RTF File that DOES load correctly into Writer
'broken.rtf' contains a 16x16 image that loads into Word but not OOo. 'word.rtf' was created by taking 'broken.rtf' loading it into MS Word then saving back out as RTF. This also fails to load in Writer. I did this test to see if the original RTF was missing a header or something. 'bright.rtf' contains a 128x200 image that is loaded correctly into Writer.
Robert thank you for using and supporting OOo. Duplicated on RH 9.0, OOo 1.0.3.1 & 1.1 Beta 2. broken.rtf loads but does not display image.
Reassigned to MRU
MRU->CMC: The graphic is completely missing and Assertion "suspicious to have a section with no page info though probably legal". Problem with a third-party-RTF? When I re-save the doc with WW, then the import is good.
cmc->mmaher: This type of graphic in rtf generally does import, give a debug into it (will disappear into svx/source/svrtf) and find where its going awry and we'll have a look at it.
Hi ho hi ho it's off to debug we go!
MM: How were the documents attached here (broken.rtf and bright.rtf) created? Were the pictures imported as bitmaps or wmf (windows metafiels)?
We are writing out the RTF files ourselves from an (internal) C++ application. It's possible that we are not writing the RTF correctly but if that were the case I would expect OOo to fail on every image and for the files not to load into MS Word. Does anyone know how I can check that the RTF is legal other than trying it in MS Word? The images are bitmaps which are loaded into memory, scaled and then streamed out into the RTF file. Thanks for looking into this, if I can do anything to help just ask.
Created attachment 7307 [details] This is the image extracted from broken.rtf
mmaher->sj: Sven, we are trying to laod what is supposedly an 8 bit windows metafile (it actually contains a bitmap). When we the RTF filter tries to use GraphicFilter to read this file it returns an unknow format error. MS Word however loads this file fine. It is the only application that can read this file. Can you throw some light on this, what is this mystery file and why is Graphic filter unable to read it?
I checked the 8bitMysteryFile.wmf, and I detected that the file was not correct. The last meta action a "StretchDib" is followed by an invalid function having a record size larger than the file itself. Even though the graphic is displayed in MS Word, other programs like the WMF and EMF decoder for Windows are crashing. I think that it is no bug reporting a graphic import error in such a case. SJ: I think this Issue should be closed.
changed resolution
As there is no protest, I close this Issue.