Issue 25391 - Writer does not resize graphics correctly
Summary: Writer does not resize graphics correctly
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 1.1.1b
Hardware: PC Windows XP
: P3 Trivial with 6 votes (vote)
Target Milestone: ---
Assignee: michael.ruess
QA Contact: issues@sw
: 19724 21938 39565 39566 50630 58078 59259 59329 75955 81176 (view as issue list)
Depends on:
Reported: 2004-02-12 01:57 UTC by jetpin
Modified: 2013-08-07 14:42 UTC (History)
6 users (show)

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

Describes image sizing defect in HTML page in OOo 1.1.2 (5.59 KB, application/vnd.sun.xml.writer)
2005-01-01 03:30 UTC, arosser
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description jetpin 2004-02-12 01:57:04 UTC
Repro steps:

1.  Drag a graphic file into a text document (I only tried .jpg)
2.  Resize the graphics by right click on the graphic and select "Graphics"
3.  At the "Type" tab, select"Relative" for both Height & Width
4.  Select also "Keep Ratio"
5.  Use the scroll bar to change the size, and click OK.
6.  Repeast step 5 a few times.

The first time you resize, the operation is successful, however, the subsequent 
ones will cause disorder to the image, i.e. if the H:W is 50%:25% each, if you 
increase 10% of the Height, you'd expect a 5% increase in the Width since "Keep 
Ratio" is selected. but instead, you'll see 200+% increase in the Width.
Also, if you unselect the Relative, you'll see notice that the image is being 
incorrectly resized.

The problem will persist for many times until you unselect the "Keep Ratio" 
click OK and select "Keep Ratio" again. So the cycle refreshes and you'll be 
granted one time of correct resizing using the "Keep Ratio". After this resize, 
the subsequent resize operations are also incorrectly done.
Comment 1 mci 2004-02-12 10:06:13 UTC
set target
Comment 2 jack.warchold 2004-02-12 14:22:40 UTC
reassigend to jw

can confirm this here on OOo1.1.1b 
droped a image into a document, and changed size after your instructions. the ratio 
randomly, not allways, changed the hight to 254% while the width is touched
reassigend to os
set target to 
Comment 3 Oliver Specht 2004-03-15 08:01:00 UTC
Comment 4 michael.ruess 2004-12-27 10:07:56 UTC
*** Issue 39566 has been marked as a duplicate of this issue. ***
Comment 5 arosser 2005-01-01 03:30:04 UTC
Created attachment 20941 [details]
Describes image sizing defect in HTML page in OOo 1.1.2
Comment 6 michael.ruess 2005-06-10 10:20:15 UTC
*** Issue 39565 has been marked as a duplicate of this issue. ***
Comment 7 i_am_nitrogen 2005-06-14 01:07:38 UTC
Comments from duplicate:

When inserting an image into a word processing document,
one typically expects the relative size setting to apply
to the original image size.  Thus, 50% would scale a 100
dpi 500 pixel image from 5" to 2.5".  However, it appears
that is using the HTML convention for
relative sizes, meaning that 50% refers to the container
of the image, and not the image itself.

For example, if an image is inserted into a 7" wide table,
with a relative width of 50%, the image will be 3.5" wide.
If that image is moved via drag-n-drop to a 4" column of
another table, the image will shrink itself to 2" wide.
This also causes the "Keep ratio" behavior to act in a
non-intuitive way.

If this behavior is intentional, some documentation or
a switch between traditional/HTML behavior would be
most appreciated.

Comment 8 michael.ruess 2005-06-14 14:00:49 UTC
*** Issue 50630 has been marked as a duplicate of this issue. ***
Comment 9 michael.ruess 2005-11-18 11:44:22 UTC
*** Issue 58078 has been marked as a duplicate of this issue. ***
Comment 10 michael.ruess 2005-12-13 08:05:27 UTC
*** Issue 59259 has been marked as a duplicate of this issue. ***
Comment 11 michael.ruess 2005-12-14 13:36:46 UTC
*** Issue 59329 has been marked as a duplicate of this issue. ***
Comment 12 obaraj 2006-01-18 17:23:07 UTC
Linux OS

Build: 2.0.1

This issue was replicated, but appears slightly different than what was 
mentioned above.

Linux step-by-step

  1) open a new "text document"
  2) insert an image
     a) select the "insert" menu
     b) select "picture"
     c) select "from file"
     d) select any picture from the file system (I used the apple.gif from
        OpenOffice directory as well as one of my own jpegs downloaded from
        a web sight)
  3) double-click image
  4) select the "type" tab
  5) in the size box select all the check boxes ( select relative for height
     and width, and the one beside keep ratio)
  6) select "ok" to save the changes
  7) double click the image again
  8) select the "type" tab
  9) change the size of either height or width (note that the size of the
     other does not change appropriately)
     (alternately uncheck the checkboxes beside "relative" for both width and
      height. Note the change in image size *only when keep aspect ration is

If you click the "original size" button the fields return to the original 
size and all changes made afterwards are correct. Also if you chose not to
save the changes to the checkbox selections, in steps 5 & 7 above, this 
problem doesn't arise.

Comment 13 kpalagin 2007-02-10 15:41:55 UTC
Issues seems to 
describe the same problem.

Dear developers,
please consider this annoying problem for 2.3
Comment 14 michael.ruess 2007-04-03 13:31:12 UTC
*** Issue 75955 has been marked as a duplicate of this issue. ***
Comment 15 michael.ruess 2007-04-03 13:32:15 UTC
*** Issue 21938 has been marked as a duplicate of this issue. ***
Comment 16 michael.ruess 2007-04-03 13:36:48 UTC
*** Issue 19724 has been marked as a duplicate of this issue. ***
Comment 17 kpalagin 2007-04-04 19:34:09 UTC
Seems to be dup of
Resolving as such.

*** This issue has been marked as a duplicate of 21284 ***
Comment 18 Oliver Specht 2007-04-13 08:49:21 UTC
Reopened, not a duplicate of issue 21284
Comment 19 Oliver Specht 2007-04-13 08:51:46 UTC
There's a member fWidthHeightRation in sw/source/ui/frmdlg/frmpage.cxx that is
set  wrong if the graphic already has relative values when the dialog is openened.
Comment 20 Oliver Specht 2007-06-22 10:15:26 UTC
Fixed in cws os98 in sw/source/ui/frmdlg/frmpage.cxx
Comment 21 Oliver Specht 2007-06-29 10:02:59 UTC
Reassigned for verification
Comment 22 parity 2007-07-01 12:53:52 UTC
I think this issue is in correlation to issue 64137.

Is it possible to fix issue 64137 for OOo 2.3?
Comment 23 michael.ruess 2007-07-05 10:46:15 UTC
MRU->OS: fix is not good enough for me ;-)
Now you do not get values of 254% anymore - but the height of graphics width
relative values now switches to a still wrong value when resizing via dialog.
Comment 24 michael.ruess 2007-07-05 10:48:19 UTC
Reopened issue.
Comment 25 Oliver Specht 2007-07-06 11:02:30 UTC
Again fixed in frmpage.cxx
Comment 26 Oliver Specht 2007-07-06 11:04:51 UTC
Reassigned for verification
Comment 27 michael.ruess 2007-07-10 09:50:25 UTC
Verified fix in CWS os98.
Comment 28 michael.ruess 2007-07-17 13:20:48 UTC
Checked fix in OO 2.3 dev build 680m221.
Comment 29 michael.ruess 2007-08-31 13:09:08 UTC
*** Issue 81176 has been marked as a duplicate of this issue. ***
Comment 30 parity 2007-10-06 18:37:34 UTC
Is this issue in some way correlated to issue 64137 where the resizing of
graphics does not correctly work?
Comment 31 parity 2007-10-06 18:39:16 UTC
Sorry, pasted into wrong issue.
Comment 32 skelem 2009-04-28 01:13:40 UTC
This is still broken in 3.0.1.

I have a link to a picture in an OO document.
When I double-click on the picture, I get the Picture dialog.
In the Type tab, the Width comes up as:
  Width [x] Relative 100%
  Height [ ] Relative 1.36"
  [x] Keep ratio
1. If I check the Height Relative box, the Relative Width changes from 100% to
48%, and the height to 82%.

2. If I then cancel the Picture dialog, and double-click the picture to bring up
the picture dialog, the Width changes from 100% to 2.82", and the Height changes
from 1.36" to 2.82"!

3. If I click on "Original Size", it shows Width=3.62", Height=4.24". The
picture is a PNG 729x410 pixels, with 300 pixels/inch. The correct width and
height are 729/300=2.4300" and 410/300=1.3666", respectively.
Comment 33 parity 2009-04-28 07:35:22 UTC

I am also annoyed by the aspect ratio bugs. Please have a look at issue 86978.
Maybe this issue describes the bug you announced.
Comment 34 michael.ruess 2009-04-28 09:01:22 UTC
I think, the problem skelem mentioned is more covered by issue 72837.
Comment 35 billkissky 2009-10-31 19:19:18 UTC
Does Open Office text program re-size or shrink one page?  If they do, I can't 
find it in the icon sections at the top of my menu bar.
Comment 36 wcdeich4 2010-05-15 07:10:07 UTC
Another detail - in Writer - you can right click on pictures & go to
"picture..." and click on "keep ratio" -- this should mean that if you scale the
picture up to make it bigger or down to make it smaller, the aspect ratio stays
the same -- but it doesn't -- even after checking "keep ratio" you can easily
distort the picture to be very narrow vertically or horizontally - even from the
corner square select points.