diff options
author | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-08-12 23:48:30 +0200 |
---|---|---|
committer | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-10-17 20:38:15 +0200 |
commit | 557e194dbdf119a82792fd579998caa062c77310 (patch) | |
tree | 964352a29b0f8bd7246a263a786a186b99d05023 /src/misc.c | |
parent | 25a381f61308794f20796596a02ae67a1d55b7fc (diff) |
Preserve aspect ratio of images
When posible, change the image size so the aspect ratio is always
preserved. This is only posible when one or both dimensions have some
room to play. When both dimensions are not fixed, a naive algorithm
tries to satisfy all {min,max}-{width,height} and aspect ratio
constraints, but it may fail. In that case, the aspect ratio is not
preserved.
Fixes the HTML tests img-aspect-ratio and img-max-bounds.
Diffstat (limited to 'src/misc.c')
0 files changed, 0 insertions, 0 deletions