Evas JPEG loader: if both width and height scale dimensions are given, we want to use the biggest computed dimensions.

Fixes some ugly views if width and height factors are too much different.


SVN revision: 51774
This commit is contained in:
Chidambar Zinnoury 2010-08-31 06:50:48 +00:00
parent 04b32dda5f
commit e42df55f10
1 changed files with 4 additions and 1 deletions

View File

@ -136,8 +136,11 @@ evas_image_load_file_head_jpeg_internal(Image_Entry *ie, FILE *f, int *error)
h2 = (ie->load_opts.w * h) / w;
if ((ie->load_opts.h > 0) && (h2 > ie->load_opts.h))
{
int w3;
h2 = ie->load_opts.h;
w2 = (ie->load_opts.h * w) / h;
w3 = (ie->load_opts.h * w) / h;
if (w3 > w2)
w2 = w3;
}
}
else if (ie->load_opts.h > 0)