summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorjiin.moon <jiin.moon@samsung.com>2015-03-20 14:02:58 +0900
committerChunEon Park <chuneon.park@samsung.com>2015-03-20 14:02:58 +0900
commit34d92d4d1e7b08e7e1d60f4932da6b111f415edd (patch)
tree182d6fa2c8381203c38410b7094a65dae059080d /src/lib
parent262dd3a1394a52c3ff10c8c057d37e346a3bf75a (diff)
emile: Remove unnecessary check in _emile_jpeg_head function
Summary: Already checked it by "else if ((opts->w > 0) && (opts->h > 0))" Reviewers: cedric, Hermet Reviewed By: Hermet Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2199
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/emile/emile_image.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/lib/emile/emile_image.c b/src/lib/emile/emile_image.c
index 55ad99de43..99a21b7145 100644
--- a/src/lib/emile/emile_image.c
+++ b/src/lib/emile/emile_image.c
@@ -1441,23 +1441,15 @@ _emile_jpeg_head(Emile_Image *image,
1441 opts->h = load_opts_w; 1441 opts->h = load_opts_w;
1442 } 1442 }
1443 1443
1444 if (opts->w > 0) 1444 w2 = opts->w;
1445 { 1445 h2 = (opts->w * prop->h) / prop->w;
1446 w2 = opts->w; 1446 if (h2 > opts->h)
1447 h2 = (opts->w * prop->h) / prop->w;
1448 if ((opts->h > 0) && (h2 > opts->h))
1449 {
1450 unsigned int w3;
1451 h2 = opts->h;
1452 w3 = (opts->h * prop->w) / prop->h;
1453 if (w3 > w2)
1454 w2 = w3;
1455 }
1456 }
1457 else if (opts->h > 0)
1458 { 1447 {
1448 unsigned int w3;
1459 h2 = opts->h; 1449 h2 = opts->h;
1460 w2 = (opts->h * prop->w) / prop->h; 1450 w3 = (opts->h * prop->w) / prop->h;
1451 if (w3 > w2)
1452 w2 = w3;
1461 } 1453 }
1462 prop->w = w2; 1454 prop->w = w2;
1463 prop->h = h2; 1455 prop->h = h2;