From: illogict Date: Tue, 31 Aug 2010 06:50:48 +0000 (+0000) Subject: Evas JPEG loader: if both width and height scale dimensions are given, we want to... X-Git-Tag: 2.0_alpha~240^2~1579 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bb03af89e40e13a7f65120656e71a2613b4e4154;p=framework%2Fuifw%2Fevas.git 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. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@51774 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/modules/loaders/jpeg/evas_image_load_jpeg.c b/src/modules/loaders/jpeg/evas_image_load_jpeg.c index 65f7fc7..005232c 100644 --- a/src/modules/loaders/jpeg/evas_image_load_jpeg.c +++ b/src/modules/loaders/jpeg/evas_image_load_jpeg.c @@ -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)