diff options
author | Joaquim Rocha <jrocha@endlessm.com> | 2017-11-10 18:06:28 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2017-11-10 20:23:18 +0000 |
commit | 97402f4dce6e7c0a2e803521550e095cda4f5fb5 (patch) | |
tree | f7d6f32e5cd78c17b6faa2872dafb9a5bc361cdc /libappstream-builder | |
parent | 4dc16610ff41396391be4d8027f3d823af6621f0 (diff) | |
download | appstream-glib-97402f4dce6e7c0a2e803521550e095cda4f5fb5.tar.gz |
Fix the arithmetic when fitting an image in 16:9
When saving a 16:9 pixbuf and the image parameter is not 16:9 we create
a transparent pixbuf with this ratio and fit the image in it. However,
this calculation was not correctly done due to an integer division so
the result is that the width/height of the pixbuf's area to be copied
was bigger than what the dimensions of the pixbuf; so no image was
copied and we'd be left with a trasnparent pixbuf.
This patch fixes this problem by using multiplications instead of
a division in the mentioned code (as they avoid imprecision problems).
Diffstat (limited to 'libappstream-builder')
0 files changed, 0 insertions, 0 deletions