After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 701784 - incorrect keep aspect ratio if output width=height
incorrect keep aspect ratio if output width=height
Status: RESOLVED OBSOLETE
Product: librsvg
Classification: Core
Component: general
2.36.x
Other Windows
: Normal normal
: ---
Assigned To: librsvg maintainers
librsvg maintainers
Depends on:
Blocks:
 
 
Reported: 2013-06-07 11:57 UTC by Bakhtiar Hasmanan
Modified: 2017-12-13 18:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proportional resizing patch (970 bytes, patch)
2015-02-14 04:11 UTC, Bakhtiar Hasmanan
none Details | Review

Description Bakhtiar Hasmanan 2013-06-07 11:57:22 UTC
in rsvg-size-callback.c:
 ...
     if (real_data->keep_aspect_ratio) {
         int out_min = MIN (*width, *height);

         if (out_min == *width) {
             *height = in_height * ((double) *width / (double) in_width);
         } else {
             *width = in_width * ((double) *height / (double) in_height);
         }
     }
 ...

case
input width > height:
2048x1024 => -w512 -h512 -a => 512x256 (OK)

input height > width:
2048x1024 => -w512 -h1024 
=> -w256 -h256 -a => 256x512 (should be 128x256)
Comment 1 Bakhtiar Hasmanan 2015-02-14 04:11:49 UTC
Created attachment 296813 [details] [review]
proportional resizing patch

Proposed resize cb patch
Comment 2 GNOME Infrastructure Team 2017-12-13 18:00:14 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/librsvg/issues/78.