summaryrefslogtreecommitdiff
path: root/src/lib/emile
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 /src/lib/emile
parent4a2f14638f56197f26c2e1bcc642cf963f21c5e3 (diff)
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
Diffstat (limited to 'src/lib/emile')
-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,
1731 { 1731 {
1732 region = 1; 1732 region = 1;
1733 1733
1734 if (prop->rotated)
1735 {
1736 unsigned int load_region_x = 0, load_region_y = 0;
1737 unsigned int load_region_w = 0, load_region_h = 0;
1738
1739 load_region_x = opts->region.x;
1740 load_region_y = opts->region.y;
1741 load_region_w = opts->region.w;
1742 load_region_h = opts->region.h;
1743 _rotate_region(&opts_region.x, &opts_region.y,
1744 &opts_region.w, &opts_region.h,
1745 load_region_x, load_region_y,
1746 load_region_w, load_region_h,
1747 w, h, degree, prop->flipped);
1748 }
1749
1750 /* scale value already applied when decompress. 1734 /* scale value already applied when decompress.
1751 When access to decoded image, have to apply scale value to region value */ 1735 When access to decoded image, have to apply scale value to region value */
1752 if (prop->scale > 1) 1736 if (prop->scale > 1)
@@ -1765,6 +1749,23 @@ _emile_jpeg_data(Emile_Image *image,
1765 opts_region.h = opts->region.h; 1749 opts_region.h = opts->region.h;
1766 } 1750 }
1767 1751
1752
1753 if (prop->rotated)
1754 {
1755 unsigned int load_region_x = 0, load_region_y = 0;
1756 unsigned int load_region_w = 0, load_region_h = 0;
1757
1758 load_region_x = opts_region.x;
1759 load_region_y = opts_region.y;
1760 load_region_w = opts_region.w;
1761 load_region_h = opts_region.h;
1762 _rotate_region(&opts_region.x, &opts_region.y,
1763 &opts_region.w, &opts_region.h,
1764 load_region_x, load_region_y,
1765 load_region_w, load_region_h,
1766 w, h, degree, prop->flipped);
1767 }
1768
1768 } 1769 }
1769 if ((!region) && ((w != ie_w) || (h != ie_h))) 1770 if ((!region) && ((w != ie_w) || (h != ie_h)))
1770 { 1771 {