summaryrefslogtreecommitdiff
path: root/src/modules/evas/loaders/jpeg/evas_image_load_jpeg.c
diff options
context:
space:
mode:
authorwonguk.jeong <wonguk.jeong@samsung.com>2014-06-29 15:04:03 +0200
committerCedric Bail <cedric.bail@free.fr>2014-06-29 15:04:21 +0200
commit7754f3e87f4349cf31b11283f336b7389652b190 (patch)
tree13bda152a01f332862e92ca2cb05cc752e5229fb /src/modules/evas/loaders/jpeg/evas_image_load_jpeg.c
parent87b8339b81297720279b1a92f332fdafba69a330 (diff)
evas: fix jpeg loader rotation by metadata (exif)
Summary: 90 or 270 degree rotation is not working properly width should be regarded as height, and vice versa. if this patch and D1082 were commited, rotation from metadata will be working properly by using evas_object_image_load_orientation_set() @fix Test Plan: add image object and invoke evas_object_image_load_orientation_set() -> load file with orientation metadata -> check whether image is rotated properly or not Reviewers: raster, cedric, jpeg CC: seoz, cedric Differential Revision: https://phab.enlightenment.org/D1084 Signed-off-by: Cedric Bail <cedric.bail@free.fr>
Diffstat (limited to '')
-rw-r--r--src/modules/evas/loaders/jpeg/evas_image_load_jpeg.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/modules/evas/loaders/jpeg/evas_image_load_jpeg.c b/src/modules/evas/loaders/jpeg/evas_image_load_jpeg.c
index e2fd97ca73..0ec2c85c00 100644
--- a/src/modules/evas/loaders/jpeg/evas_image_load_jpeg.c
+++ b/src/modules/evas/loaders/jpeg/evas_image_load_jpeg.c
@@ -1076,8 +1076,8 @@ done:
1076 1076
1077 if (prop->rotated) 1077 if (prop->rotated)
1078 { 1078 {
1079 DATA32 *data1, *data2, *to, *from; 1079 DATA32 *data1, *data2, *to, *from;
1080 int lx, ly, lw, lh, hw; 1080 int lx, ly, lw, lh, hw;
1081 1081
1082 lw = w; 1082 lw = w;
1083 lh = h; 1083 lh = h;
@@ -1107,26 +1107,26 @@ done:
1107 1107
1108 if (degree == 90) 1108 if (degree == 90)
1109 { 1109 {
1110 to = data1 + lw - 1; 1110 to = data1 + lh - 1;
1111 hw = -hw - 1; 1111 hw = -hw - 1;
1112 } 1112 }
1113 else if (degree == 270) 1113 else if (degree == 270)
1114 { 1114 {
1115 to = data1 + hw - lw; 1115 to = data1 + hw - lh;
1116 lw = -lw; 1116 lh = -lh;
1117 hw = hw + 1; 1117 hw = hw + 1;
1118 } 1118 }
1119 1119
1120 if (to) 1120 if (to)
1121 { 1121 {
1122 from = data2; 1122 from = data2;
1123 for (lx = w; --lx >= 0;) 1123 for (lx = h; --lx >= 0;)
1124 { 1124 {
1125 for (ly = h; --ly >= 0;) 1125 for (ly = w; --ly >= 0;)
1126 { 1126 {
1127 *to = *from; 1127 *to = *from;
1128 from++; 1128 from++;
1129 to += lw; 1129 to += lh;
1130 } 1130 }
1131 to += hw; 1131 to += hw;
1132 } 1132 }