Issue 59648 - WW8: large captioned image shrinked to null-size on export
Summary: WW8: large captioned image shrinked to null-size on export
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: save-export (show other issues)
Version: OOo 2.0.1
Hardware: PC Linux, all
: P3 Trivial with 7 votes (vote)
Target Milestone: ---
Assignee: michael.ruess
QA Contact: issues@sw
URL:
Keywords: needmoreinfo, oooqa
: 65117 74205 74407 82803 (view as issue list)
Depends on:
Blocks:
 
Reported: 2005-12-21 17:37 UTC by bhaskara
Modified: 2013-08-07 14:44 UTC (History)
3 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
writer file with captioned jpg images (526.66 KB, application/vnd.oasis.opendocument.text)
2005-12-21 22:06 UTC, ajmc
no flags Details
one-liner bugfix (572 bytes, patch)
2009-11-10 19:04 UTC, miguelfreitas
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description bhaskara 2005-12-21 17:37:37 UTC
1) using gimp or equivalent tool create .jpg files of size 500x500, 1000x1000
and 2000x2000 pixels. Let us call it 500.jpg, 1000.jpg and 2000.jpg.

2) Open a new text document and save as whatEverName.doc

3) Using Menu->Insert->picture->from file, insert images 500.jpg, 1000.jpg and
2000.jpg

4) caption each of the images by right clicking on the image and selecting
caption. In the Caption dialogue box enter the caption text and in the
properties, select Illustration.

5) save whatEverName.doc file

6) Relload file using Menu->File->Reload

On reload, the 2000.jpg disappears where as 500.jpg and 1000.jpg is still present. 

-Ganesha
Comment 1 bhaskara 2005-12-21 17:50:56 UTC
I forgot to mention that this behavior is not seen when files are saved as
native .odt

-G
Comment 2 lars 2005-12-21 19:23:25 UTC
'6)' should revert all changes and give you an empty document if you haven't 
saved inbetween.
if you close and reload I cannot reproduce your problem with OOo 2.0.1 RC5.
There is a known issue of disappearing images if there is not enough free 
space in the temp directory (for virtual memory purposes); a jpeg of 
resolution 2000x2000 as you have used could trigger such a problem.
Comment 3 bhaskara 2005-12-21 19:42:34 UTC
OO 2.01 is producing the same behavior on a different (FC4) linux system. 

To keep things simple, I used only one 2000x2000 figure. I inserted and figure
and captioned it. Then I saved the .doc file. I closed the OO application. Again
when I opened the saved file with OO 2.01 the figure was missing BUT the file
size had not changed, which means there was not data loss, but the figure is not
being displayed. 

-G
Comment 4 lars 2005-12-21 20:10:00 UTC
cannot reproduce; may be an OS problem
Comment 5 bhaskara 2005-12-21 20:37:29 UTC
Thats odd ....... I just reporduced it on WinXP with OO 2.0 

-G
Comment 6 lars 2005-12-21 20:48:58 UTC
You wrote that this problem does not occur with odt files. If when you resave 
the odt as doc the problem appears again, can you attach the odt? Can you also 
attach the JPEGs, perhaps it's related to them. And if these things are not 
doable, could you give a detailed step-by-step description listing eg whether 
you enter carriage returns after inserting one image etc.? thanks!
Comment 7 bhaskara 2005-12-21 21:09:51 UTC
I have uploaded the files to 
http://www-rcf.usc.edu/~bhaskara/OO/

there is an image file Untitled.jpg.

In the directory startFromDoc, I initially created a .doc file inserted the
image and captioned it and saved the file. On reload the image was missing.
Then, I save this .doc file as .odt

In the directory startFromOdt, I initially created a .odt file, inserted the
image and captioned it and saved the file. This is the omly file in which I cam
able to see the figure. I then saved this file as .doc and again saved the .doc
as .odt. The file name should indicate this.

Hope this helps

-G
Comment 8 bhaskara 2005-12-21 21:36:03 UTC
atleast one other person was able to reproduce this behavior
http://www.openoffice.org/servlets/ReadMsg?list=users&msgNo=109935

-G
Comment 9 ajmc 2005-12-21 22:06:04 UTC
Created attachment 32634 [details]
writer file with captioned jpg images
Comment 10 ajmc 2005-12-21 22:06:42 UTC
I was able to reproduce the behaviour with v2.0 (680m3 build 8968). I've
attached an odt file that has three jpgs with captions, type 'illustration'. All
are copies of the same picture, converted to 500x500, 1000x1000 and 2000x2000
using xnview. If you save it in Word97 doc format, close, then re-open the file,
the 2000 image will be gone. A frame will remain that has changed to type 'text'.
tc
Comment 11 michael.ruess 2005-12-22 09:07:18 UTC
MRU->FLR: the graphic lower on the page will shrink to minimal size when
exporting to WW8 format.
As one can see in the Navigator, the graphi is not completely lost.
Comment 12 bhaskara 2005-12-22 14:40:41 UTC
I converted a .odt file to .doc and converted it back to .odt using saveas. On
going through the context.xml file, I realized that the size of the large image
is becoming negative when the file is exported to .doc and hence is not being
displayed

svg:width="-4.4154in" svg:height="0.0161in"

-G
Comment 13 bhaskara 2005-12-22 14:42:58 UTC
typo in previous post. context.xml should have been content.xml

Apologies

-G
Comment 14 michael.ruess 2006-05-08 12:01:27 UTC
*** Issue 65117 has been marked as a duplicate of this issue. ***
Comment 15 Mathias_Bauer 2006-08-30 14:55:33 UTC
assigned to hbrinkm
Comment 16 michael.ruess 2007-02-08 16:29:58 UTC
*** Issue 74205 has been marked as a duplicate of this issue. ***
Comment 17 rsquirrel 2007-02-09 00:43:33 UTC
OO 2.0 and 2.1 both exhibit this under Windows 98SE (re: duplicate issue 
#74205).  The shrinking can occur with both revs even without a caption.  When 
I reported #74205, I had two documents, a 27 MB file and a 5 MB file, which 
both exhibited the problem with rev 2.0.  With rev 2.1, the 27 MB file did not 
exhibit the probem but the 5 MB file did.  None of the images in either file 
had captions.
  I now observe that all the graphics in the 27 MB file were anchored 'To 
Paragraph' and all the graphics in the 5 MB file were anchored 'As Character'.  
Not all the graphics anchored 'As Character' experienced the shrinkage but most 
did.  When I tried 'Anchor To Character' or 'Anchor To Paragraph' (no 
captions), none of the graphics in the 5 MB file shrunk with OO 2.1.

I postulate the following, when saving file as Win97/2000/XP .doc:

 (without captions):

OO 2.0 shrinks images when images are anchored 'To Paragraph', but I can't 
easily test other cases since I don't have 2.0 installed now.
OO 2.1 shrinks images when images are anchored 'As Character' but not 'To 
Character' nor 'To Paragraph'.  I don't understand 'To Page' so I'm not testing 
it.

 (with captions):

OO 2.1 encounters some kind of problem with all the anchor options I tried 
(didn't try 'To Page').  Anchor 'As Character' in one case shrunk the image 
only horizontally, to a vertical line of full height.  In another case it left 
the photo unchanged but truncated the caption to 2 characters.  Note to MRU - 
This is Figure 5 in the test file I sent you; for this test, I added captions 
to all graphics for which caption was available and kept 'As Character' for all 
anchors.

None of the shrinking occurences I've observed affect anything except .jpg 
images.
Comment 18 michael.ruess 2007-02-12 10:35:25 UTC
*** Issue 74407 has been marked as a duplicate of this issue. ***
Comment 19 michael.ruess 2007-10-23 15:38:26 UTC
*** Issue 82803 has been marked as a duplicate of this issue. ***
Comment 20 gkg21 2008-10-18 10:38:02 UTC
I am amazed that this issue has not be solved yet - since 2005! I am using OOo3
now - same problem. This is the single major issue for me in OOo. 
If the problem is difficult to fix, would it at least be possible to have a
pop-up window or something show when a user tries to attach a large jpg file?
There is after all a workaround that users should now about (i.e. resizing the
image with a photo editing app).
The pop-up could read something like "You have chosen to insert an image with a
resolution larger than XXX. Please note that you might encounter problems when
saving your document to MS Word format. It is advisable to resize the image
first using a photo editing software. Do you wish to continue? (y/n)'.
Comment 21 miguelfreitas 2009-11-06 14:04:32 UTC
It is strange what nothing happens to this issue. The same goes with issue 74246.

Did you people fired your WW8 developer?
Comment 22 miguelfreitas 2009-11-10 19:04:16 UTC
Created attachment 66053 [details]
one-liner bugfix
Comment 23 caolanm 2009-11-12 08:42:28 UTC
patch available, so changing defect type
Comment 24 openoffice 2009-11-13 16:20:49 UTC
applied patch and verified

changeset:   263238:7f5839c6d2af
user:        Henning Brinkmann[hbrinkm] <hbrinkm@openoffice.org>
date:        Fri Nov 13 17:17:57 2009 +0100
summary:     hb33patches1:#i59648# applied patch
Comment 25 openoffice 2010-06-03 15:08:04 UTC
ready for QA
Comment 26 michael.ruess 2010-06-08 15:58:40 UTC
Verified fix in CWS hb33patches1.
Comment 27 caolanm 2010-06-17 20:49:22 UTC
closing, integrated m82