Bug 64125 - Regression: Importing a big SVG image ignores it's aspect ratio
Summary: Regression: Importing a big SVG image ignores it's aspect ratio
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.2.2 release
Hardware: Other All
: high normal
Assignee: Not Assigned
URL:
Whiteboard: target:4.2.0
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-01 16:50 UTC by Alex Hultman
Modified: 2013-08-14 11:21 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
SVG created in Google Drive. GNU Octave SVG's also cause this bug. (2.77 KB, image/svg+xml)
2013-05-02 18:48 UTC, Alex Hultman
Details
With width and height given, without viewBox (334 bytes, image/svg+xml)
2013-07-05 12:15 UTC, Regina Henschel
Details
With width and height given, with viewBox (378 bytes, image/svg+xml)
2013-07-05 12:17 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Hultman 2013-05-01 16:50:15 UTC
Drag in an SVG (created with Octave / Google Drive as an example) and it will be stretched all over the page. No way to get the real aspect, you have to manually calculate and enter it. Height is stretched all over the page.
Comment 1 Jorendc 2013-05-02 18:37:58 UTC
Thanks for reporting!

Is it possible to attach a sample SVG, so we can try to reproduce this behavior?

Thanks in advance,
Joren

PS: once you provide the necessary information, please feel free to mark this bug again as UNCONFIRMED.
Comment 2 Alex Hultman 2013-05-02 18:48:29 UTC
Created attachment 78790 [details]
SVG created in Google Drive. GNU Octave SVG's also cause this bug.
Comment 3 Alex Hultman 2013-05-02 18:50:44 UTC
Attached SVG is a perfectly round circle-smiley. Open up a new Writer document and drag it in. Will be stretched like an ellipse because of the aspect bug.

Fedora 18 Linux.
Comment 4 Jorendc 2013-05-02 18:55:17 UTC
Thanks for reporting

I can reproduce this behavior using Linux Mint 14 x64 with LibreOffice 4.0.3.2. This is due the fact the image importer doesn't take the ration in account. Due the size of the image it is stretched to the boundaries (margins) of the document.

Priority:
* minor: does it make substantially harder to create high quality work
* normal: default priority of minor-bugs

Kind regards,
Joren
Comment 5 Gerry 2013-05-02 22:29:06 UTC
This bug is a regresssion. The behaviour occurs only in LO versions >= 4 

@Jorendc: Since this is a regression and it is actually a quite annoying bug that prevents high quality work, I vote for increasing the importance to "high" and the priority of the bug to "normal". I think also the keyword "regression" should be added.

I can reproduce this bug with LibreOffice 4.0.0.3 via "Insert"->"Picture"->"From File". In version 3.6.2.2 inserting works perfectly. This is indeed a regression.
Comment 6 Jorendc 2013-05-10 16:55:37 UTC
(In reply to comment #5)
> @Jorendc: Since this is a regression and it is actually a quite annoying bug
> that prevents high quality work, I vote for increasing the importance to
> "high" and the priority of the bug to "normal". I think also the keyword
> "regression" should be added.
@Gerry: I agree with  that. Thanks
Comment 7 Cor Nouws 2013-06-18 21:58:32 UTC
maybe (distantly) related: bug 65870 ?
Comment 8 Commit Notification 2013-07-04 12:22:14 UTC
Chr. Rossmanith committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2ea69ec976fa7bb681746c65807888853ce1b8ea

Fix fdo#64125 - Use default for preserveAspectRatio scaling



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 9 Regina Henschel 2013-07-05 12:15:59 UTC
Created attachment 82071 [details]
With width and height given, without viewBox

The picture has width="8cm" height="4cm" and so should be the size in LO. Same with the next attchement.
Comment 10 Regina Henschel 2013-07-05 12:17:09 UTC
Created attachment 82072 [details]
With width and height given, with viewBox
Comment 11 Regina Henschel 2013-07-05 12:20:07 UTC
The patch introduces a new error. Given width and height of the picture are no longer considered for target range and therefore the size is wrong in this cases.
Comment 12 Caolán McNamara 2013-08-14 11:21:01 UTC
*seems* to be ok post b1ac43d1ab416d334a0feb93244941eee447abcf