GNOME Bugzilla – Bug 701784
incorrect keep aspect ratio if output width=height
Last modified: 2017-12-13 18:00:14 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)
Created attachment 296813 [details] [review] proportional resizing patch Proposed resize cb patch
-- 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.