Issue 12485

Summary: RTF export of pictures unusable - no applications supports OOo's approach
Product: Writer Reporter: sajer <ballonskipper>
Component: codeAssignee: michael.ruess
Status: CLOSED DUPLICATE QA Contact: issues@sw <issues>
Severity: Trivial    
Priority: P3 CC: egle, hub, issues, t8m
Version: 644   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Issue Type: ENHANCEMENT Latest Confirmation in: ---
Developer Difficulty: ---

Description sajer 2003-03-19 21:59:47 UTC
I quote a post from oooforum.org:

"In a similar document in Word the image is embedded IN the RTF file, right, 
why does OOo not embed pictures too? I have seen many many people using RTF for 
exchange of documents (quite a few of them are using WordPerfect for some 
reason, or older version of Word). 

Saving images seperately is not a good idea, then people will never use RTF for 
export and mailing to friends etc., if they then have to attatch 2 or more 
files. A complex document can contain many pictures. 

But now I discovered that seperate images are just not supported. Read on: 

Because of the wide RTF support in many applications I have considered RTF the 
best cross-app format, I think that embedding pictures should be the standard, 
and anything else an option. 

Oh well, Writer just crashed when trying to import a test RTF file with an 
embedded pciture. All my other apps succeeded in importing this file.  

AND Word did not open a RTF file with the linked image correctly (exported from 
Writer), neither did FrameMaker 7, AbiWord, RagTime or whatever I tried to open 
the file with. The image was not imported in these apps at all. 

Now, what can we use the RTF export for when nothing imports pictures from the 
files exported from OOo? 

Working RTF support is VERY important if OOo wants to work together with other 
apps, especially DTP software. This is almost the biggest blow I have 
experienced to my plans of switching to Writer. In fact I am close to leave OOo 
for some time now. 

Until the day when other suites and apps support the XML format from OOo (we 
are talking years), OOo MUST support the reality. And that means RTF, even if 
linked images are a part of the RTF standard and just not supported by other 
apps. Then OOo have to embed pictures anyway, just to make things WORK."

Do not waste time discussin standard now, what counts is the RTF files exported 
from OOo are unusable AND a pain in the *** to mail to friend etc.
Comment 1 egle 2003-03-28 12:31:18 UTC
I can confirm this bug. OOo has lot of problems with RTF export. Some
pictures are not visible not only in other programs (AbiWord, MS Word,
etc), but even in OpenOffice.org after exporting to RTF.
See for example .sxw document, attached to the bug #12713
Comment 2 egle 2003-03-28 12:32:03 UTC
I can confirm this bug. OOo has lot of problems with RTF export. Some
pictures are not visible not only in other programs (AbiWord, MS Word,
etc), but even in OpenOffice.org after exporting to RTF.
See for example .sxw document, attached to the bug #12713
Comment 3 eric.savary 2003-04-26 00:06:38 UTC
First: cool down!
Second (simpy explained): let's talk anyway about standard: RTF is 
a "norm" defined by Microsoft. MS says in the RTF standard "no 
embedded picturea in RTF for it is a Rich ***Text*** Format". So OOo 
follows the specification and doesn't embed pictures in RTF. BUT MS-
Word produces RTF with embedded pictures. Means *doesn't follow it's 
own specification*...

ES->MRU: please correct me
Comment 4 eric.savary 2003-04-26 00:07:12 UTC
Reassigned to MRU
Comment 5 michael.ruess 2003-05-13 14:45:09 UTC
MRU->CMC: I think, you already have a task regarding "embedded
graphics in RFT code"?
If so, please re-assign this to me with the corresponding Task ID. 
Thank you very much!
Comment 6 caolanm 2003-05-13 14:56:47 UTC
issue 3790 / #104178#

cmc->er: *cough* the new graphic stuff is documented in the more
recent rtf specification documents. It's just very time intensive to
implement it at this juncture.
Comment 7 hub 2003-05-13 15:40:39 UTC
see issue 2244
I'm happy that this problems get raised again.

Implementing bitmap image import is quite trivial: Here is the syntax:
{\*\shppict{\pict\pngblip\picw100\pich100
\bliptag10000{\*\blipuid 00000000000000000000000000002710}
89504e470d0a1a0a0000000d4948445200000064000000640802000000ff8002
030000000467414d410000b18f0bfc610500000006624b474400ff00ff00ffa0

The hex stuff is in that case PNG data. That can be JPEG or even WMF
or PICT (Mac). All you need is to handle a few keywords and pass to
the graphic importer. I myself did that a while back in AbiWord.... It
did not take very long.
\pict is in RTF 1.4 spec, which is dated sept. 95. I can't call that
"newer".... It allow raw PICT (Mac), WMF or DIB (BMP). Spec 1.5 allow
RTF and PNG (see above) and isn't much complex.

What is hard to handle is vector image format (shapes) provided by the
\*\shppict. But for a start handling bitmap should be nice.
Comment 8 hub 2003-05-13 15:43:20 UTC
snippet above is from attachment 719 [details]
Comment 9 michael.ruess 2003-05-13 15:50:17 UTC
Issue is already tracked as #3790. So this is closed as duplicate.

*** This issue has been marked as a duplicate of 3790 ***
Comment 10 michael.ruess 2003-05-13 16:01:22 UTC
closed.
Comment 11 t8m 2003-05-13 16:31:34 UTC
I don't agree on this completely. It should be split to 2 issues.

1. issue: Support embedding bitmaps as in Hubert's comment. (It could
be possible to do it in 1.1 timeline or maybe in some 1.1.x version.)
2. issue 3790: Which should track supporting drawing objects as
shapes, lines and so on.