summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjiin.moon <jiin.moon@samsung.com>2016-08-19 12:09:31 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-08-19 15:19:08 +0900
commitc54bd44790ee74f86cbec7edcba4a1d3ea31101c (patch)
treea5dbc0667358b0ed5d0e0b900ed6a6ffe4c2c0b4
parent4a2f14638f56197f26c2e1bcc642cf963f21c5e3 (diff)
downloadefl-c54bd44790ee74f86cbec7edcba4a1d3ea31101c.tar.gz
emile: fix jpeg loader broken with orientation
Summary: After applying a patch regarding region, side-effect detected. Fixes T4390 Test Plan: make check Reviewers: jpeg, cedric, jypark Maniphest Tasks: T4390 Differential Revision: https://phab.enlightenment.org/D4245
-rw-r--r--src/lib/emile/emile_image.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/lib/emile/emile_image.c b/src/lib/emile/emile_image.c
index 7c1db48a07..c7baff8ea1 100644
--- a/src/lib/emile/emile_image.c
+++ b/src/lib/emile/emile_image.c
@@ -1731,22 +1731,6 @@ _emile_jpeg_data(Emile_Image *image,
{
region = 1;
- if (prop->rotated)
- {
- unsigned int load_region_x = 0, load_region_y = 0;
- unsigned int load_region_w = 0, load_region_h = 0;
-
- load_region_x = opts->region.x;
- load_region_y = opts->region.y;
- load_region_w = opts->region.w;
- load_region_h = opts->region.h;
- _rotate_region(&opts_region.x, &opts_region.y,
- &opts_region.w, &opts_region.h,
- load_region_x, load_region_y,
- load_region_w, load_region_h,
- w, h, degree, prop->flipped);
- }
-
/* scale value already applied when decompress.
When access to decoded image, have to apply scale value to region value */
if (prop->scale > 1)
@@ -1765,6 +1749,23 @@ _emile_jpeg_data(Emile_Image *image,
opts_region.h = opts->region.h;
}
+
+ if (prop->rotated)
+ {
+ unsigned int load_region_x = 0, load_region_y = 0;
+ unsigned int load_region_w = 0, load_region_h = 0;
+
+ load_region_x = opts_region.x;
+ load_region_y = opts_region.y;
+ load_region_w = opts_region.w;
+ load_region_h = opts_region.h;
+ _rotate_region(&opts_region.x, &opts_region.y,
+ &opts_region.w, &opts_region.h,
+ load_region_x, load_region_y,
+ load_region_w, load_region_h,
+ w, h, degree, prop->flipped);
+ }
+
}
if ((!region) && ((w != ie_w) || (h != ie_h)))
{