SVN revision: 64389
This commit is contained in:
Carsten Haitzler 2011-10-25 12:20:53 +00:00
parent a75ecced08
commit d7c699670e
1 changed files with 17 additions and 15 deletions

View File

@ -503,10 +503,9 @@ evas_image_load_file_data_jpeg_internal(Image_Entry *ie,
struct jpeg_decompress_struct cinfo; struct jpeg_decompress_struct cinfo;
struct _JPEG_error_mgr jerr; struct _JPEG_error_mgr jerr;
DATA8 *ptr, *line[16], *data; DATA8 *ptr, *line[16], *data;
DATA32 *ptr2, *ptr_rotate; DATA32 *ptr2, *ptr_rotate = NULL;
unsigned int x, y, l, i, scans; unsigned int x, y, l, i, scans;
int region = 0; int region = 0;
/* rotation setting */ /* rotation setting */
unsigned int tmp; unsigned int tmp;
unsigned int load_region_x = 0, load_region_y = 0; unsigned int load_region_x = 0, load_region_y = 0;
@ -1002,14 +1001,15 @@ done:
} }
else else
{ {
data2 = ptr_rotate; data2 = NULL;
to = NULL;
if (ptr_rotate) data2 = ptr_rotate;
if (degree == 90) if (degree == 90)
{ {
to = data1 + w - 1; to = data1 + w - 1;
hw = -hw - 1; hw = -hw - 1;
} }
else if (degree == 270) else if (degree == 270)
{ {
to = data1 + hw - w; to = data1 + hw - w;
@ -1017,6 +1017,8 @@ done:
hw = hw + 1; hw = hw + 1;
} }
if (to)
{
from = data2; from = data2;
for (x = ie->w; --x >= 0;) for (x = ie->w; --x >= 0;)
{ {
@ -1028,14 +1030,14 @@ done:
} }
to += hw; to += hw;
} }
}
if (ptr_rotate) if (ptr_rotate)
{ {
free(ptr_rotate); free(ptr_rotate);
ptr_rotate = NULL; ptr_rotate = NULL;
} }
} }
if (region ) if (region)
{ {
ie->load_opts.region.x = load_region_x; ie->load_opts.region.x = load_region_x;
ie->load_opts.region.y = load_region_y; ie->load_opts.region.y = load_region_y;