Bug 112281 - Resize of (PNG) image does not work correctly after rotate
Summary: Resize of (PNG) image does not work correctly after rotate
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Images
  Show dependency treegraph
 
Reported: 2017-09-07 17:39 UTC by Jan Vlug
Modified: 2018-05-28 12:50 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Rotate the image 90 degrees to see the issue (648.13 KB, application/vnd.oasis.opendocument.text)
2017-09-07 17:39 UTC, Jan Vlug
Details
Correctly working original LibreOffice document (644.45 KB, application/vnd.oasis.opendocument.text)
2017-09-07 17:40 UTC, Jan Vlug
Details
result after rotation (646.98 KB, application/pdf)
2017-09-10 09:03 UTC, Dieter
Details
Screenshot that shows that the image is cropped instead of resized (104.80 KB, image/png)
2017-09-10 09:32 UTC, Jan Vlug
Details
Example of correct scaling when no rotation is applied (101.33 KB, image/png)
2017-09-10 09:38 UTC, Jan Vlug
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Vlug 2017-09-07 17:39:50 UTC
Created attachment 136102 [details]
Rotate the image 90 degrees to see the issue

Note that this only seems to happen in an .odt document that was created by conversion from a Microsoft Office document.

I inserted a scanned A4 sized PNG image in Writer.
Next I rotated it 90 degrees (from portrait to landscape).
This results in a partial visible not scaled image. Scaling by using the green handles at the corner of the image does not work well.

I attached an example document showing the issue:
Rotate the image 90 degrees and see the strange behaviour.

I will also a correctly working original LibreOffice document to compare with.
Comment 1 Jan Vlug 2017-09-07 17:40:22 UTC
Created attachment 136103 [details]
Correctly working original LibreOffice document
Comment 2 Jan Vlug 2017-09-07 17:50:36 UTC
Note that when you first resize the image so that it will fit after the rotation, and only after this resize rotate, the problem seems not to occur.
Comment 3 Dieter 2017-09-10 09:03:08 UTC
Can't reproduce it. I did the following steps:
1. Open your document from comment 1
2. right click on the picture
3. rotate 90° to the left
4. everything looks fine for me (see attachment)

So can you add a document with your result? => Set to NEEDINFO. Please change it back to UNCONFIRMED, when you add the document.
Comment 4 Dieter 2017-09-10 09:03:52 UTC
Created attachment 136144 [details]
result after rotation
Comment 5 Jan Vlug 2017-09-10 09:32:11 UTC
Created attachment 136145 [details]
Screenshot that shows that the image is cropped instead of resized
Comment 6 Jan Vlug 2017-09-10 09:35:14 UTC
I confirm that I have the same result as Dieter Praas in comment 3.
The actual issue becomes visible after doing these steps after the rotation of 90° to the left:

1. Click and hold on the right bottom green square to resize the image
2. Resize the image to roughly a quarter of its size
3. Release the mouse
4. The result is a cropped image, instead of a resized image (see attachment)

When you open the initially attached example document, and repeat the procedure above (without first rotating), the image is correctly scaled.
Comment 7 Jan Vlug 2017-09-10 09:38:33 UTC
Created attachment 136146 [details]
Example of correct scaling when no rotation is applied

The attached screenshot shows that when no rotation is applied, the image is correctly scaled.
Comment 8 Thomas Lendo 2017-09-10 11:26:13 UTC
I can confirm the initial bug report of Jan.

After rotating the image in the attached test document, resizing with mouse results in cropping the image.


Version: 6.0.0.0.alpha0+
Build-ID: fc674ad1b795d74a50cb792368ce7eaee74ca904
CPU-Threads: 4; Betriebssystem:Linux 4.10; UI-Render: Standard; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-09-09_00:34:37
Gebietsschema: de-DE (de_DE.UTF-8); Calc: group
Comment 9 Telesto 2018-03-24 16:07:40 UTC
No repro with
Version: 6.1.0.0.alpha0+
Build ID: dd4f1b1bd31daf080dc0420524712dc244e539b5
CPU threads: 4; OS: Windows 6.3; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-03-20_23:26:38
Locale: en-US (nl_NL); Calc: CL
Comment 10 Buovjaga 2018-05-28 12:50:28 UTC
(In reply to Telesto from comment #9)
> No repro with
> Version: 6.1.0.0.alpha0+
> Build ID: dd4f1b1bd31daf080dc0420524712dc244e539b5
> CPU threads: 4; OS: Windows 6.3; UI render: default; 
> TinderBox: Win-x86@42, Branch:master, Time: 2018-03-20_23:26:38
> Locale: en-US (nl_NL); Calc: CL

In addition to this, there was another person on IRC today who could not reproduce, so let's close.