aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/evas/src/modules/loaders/ico/evas_image_load_ico.c
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/evas/src/modules/loaders/ico/evas_image_load_ico.c')
-rw-r--r--libraries/evas/src/modules/loaders/ico/evas_image_load_ico.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/libraries/evas/src/modules/loaders/ico/evas_image_load_ico.c b/libraries/evas/src/modules/loaders/ico/evas_image_load_ico.c
index 6e31191..4239407 100644
--- a/libraries/evas/src/modules/loaders/ico/evas_image_load_ico.c
+++ b/libraries/evas/src/modules/loaders/ico/evas_image_load_ico.c
@@ -88,7 +88,7 @@ evas_image_load_file_head_ico(Image_Entry *ie, const char *file, const char *key
88 unsigned short word; 88 unsigned short word;
89 unsigned char byte; 89 unsigned char byte;
90 int wanted_w = 0, wanted_h = 0, w, h, cols, i, planes = 0, 90 int wanted_w = 0, wanted_h = 0, w, h, cols, i, planes = 0,
91 hot_x = 0, hot_y = 0, bpp = 0, pdelta, search = -1, have_choice = 0, 91 bpp = 0, pdelta, search = -1, have_choice = 0,
92 hasa = 1; 92 hasa = 1;
93 unsigned int bmoffset, bmsize, fsize; 93 unsigned int bmoffset, bmsize, fsize;
94 unsigned short reserved, type, count; 94 unsigned short reserved, type, count;
@@ -182,10 +182,10 @@ evas_image_load_file_head_ico(Image_Entry *ie, const char *file, const char *key
182 if (!read_uchar(map, fsize, &position, &byte)) goto close_file; 182 if (!read_uchar(map, fsize, &position, &byte)) goto close_file;
183 if (!read_ushort(map, fsize, &position, &word)) goto close_file; 183 if (!read_ushort(map, fsize, &position, &word)) goto close_file;
184 if (type == CURSOR) planes = word; 184 if (type == CURSOR) planes = word;
185 else hot_x = word; 185 //else hot_x = word;
186 if (!read_ushort(map, fsize, &position, &word)) goto close_file; 186 if (!read_ushort(map, fsize, &position, &word)) goto close_file;
187 if (type == CURSOR) bpp = word; 187 if (type == CURSOR) bpp = word;
188 else hot_y = word; 188 //else hot_y = word;
189 if (!read_uint(map, fsize, &position, &bmsize)) goto close_file; 189 if (!read_uint(map, fsize, &position, &bmsize)) goto close_file;
190 if (!read_uint(map, fsize, &position, &bmoffset)) goto close_file; 190 if (!read_uint(map, fsize, &position, &bmoffset)) goto close_file;
191 if ((bmsize <= 0) || (bmoffset <= 0) || (bmoffset >= fsize)) goto close_file; 191 if ((bmsize <= 0) || (bmoffset <= 0) || (bmoffset >= fsize)) goto close_file;
@@ -315,11 +315,11 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key
315 unsigned char byte; 315 unsigned char byte;
316 unsigned int dword; 316 unsigned int dword;
317 int wanted_w = 0, wanted_h = 0, w, h, cols, i, planes = 0, 317 int wanted_w = 0, wanted_h = 0, w, h, cols, i, planes = 0,
318 hot_x = 0, hot_y = 0, bpp = 0, pdelta, search = -1, have_choice = 0, 318 bpp = 0, pdelta, search = -1, have_choice = 0,
319 stride, pstride, j, right_way_up = 0, diff_size = 0, cols2; 319 stride, pstride, j, right_way_up = 0, diff_size = 0, cols2;
320 unsigned int bmoffset, bmsize, bitcount, compression, imagesize, fsize, 320 unsigned int bmoffset, bmsize, bitcount, fsize,
321 colorsused, colorsimportant, *pal, *surface, *pix, none_zero_alpha = 0; 321 *pal, *surface, *pix, none_zero_alpha = 0;
322 unsigned short reserved, type, count, planes2; 322 unsigned short reserved, type, count;
323 unsigned char *maskbuf, *pixbuf, *p; 323 unsigned char *maskbuf, *pixbuf, *p;
324 struct { 324 struct {
325 int pdelta; 325 int pdelta;
@@ -411,10 +411,10 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key
411 if (!read_uchar(map, fsize, &position, &byte)) goto close_file; 411 if (!read_uchar(map, fsize, &position, &byte)) goto close_file;
412 if (!read_ushort(map, fsize, &position, &word)) goto close_file; 412 if (!read_ushort(map, fsize, &position, &word)) goto close_file;
413 if (type == 1) planes = word; 413 if (type == 1) planes = word;
414 else hot_x = word; 414 //else hot_x = word;
415 if (!read_ushort(map, fsize, &position, &word)) goto close_file; 415 if (!read_ushort(map, fsize, &position, &word)) goto close_file;
416 if (type == 1) bpp = word; 416 if (type == 1) bpp = word;
417 else hot_y = word; 417 //else hot_y = word;
418 if (!read_uint(map, fsize, &position, &bmsize)) goto close_file; 418 if (!read_uint(map, fsize, &position, &bmsize)) goto close_file;
419 if (!read_uint(map, fsize, &position, &bmoffset)) goto close_file; 419 if (!read_uint(map, fsize, &position, &bmoffset)) goto close_file;
420 if ((bmsize <= 0) || (bmoffset <= 0) || (bmoffset >= fsize)) goto close_file; 420 if ((bmsize <= 0) || (bmoffset <= 0) || (bmoffset >= fsize)) goto close_file;
@@ -540,19 +540,19 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key
540 file, ie->w, ie->h, w, h); 540 file, ie->w, ie->h, w, h);
541 } 541 }
542 if (!read_ushort(map, fsize, &position, &word)) goto close_file; // planes 542 if (!read_ushort(map, fsize, &position, &word)) goto close_file; // planes
543 planes2 = word; 543 //planes2 = word;
544 if (!read_ushort(map, fsize, &position, &word)) goto close_file; // bitcount 544 if (!read_ushort(map, fsize, &position, &word)) goto close_file; // bitcount
545 bitcount = word; 545 bitcount = word;
546 if (!read_uint(map, fsize, &position, &dword)) goto close_file; // compression 546 if (!read_uint(map, fsize, &position, &dword)) goto close_file; // compression
547 compression = dword; 547 //compression = dword;
548 if (!read_uint(map, fsize, &position, &dword)) goto close_file; // imagesize 548 if (!read_uint(map, fsize, &position, &dword)) goto close_file; // imagesize
549 imagesize = dword; 549 //imagesize = dword;
550 if (!read_uint(map, fsize, &position, &dword)) goto close_file; // z pixels per m 550 if (!read_uint(map, fsize, &position, &dword)) goto close_file; // z pixels per m
551 if (!read_uint(map, fsize, &position, &dword)) goto close_file; // y pizels per m 551 if (!read_uint(map, fsize, &position, &dword)) goto close_file; // y pizels per m
552 if (!read_uint(map, fsize, &position, &dword)) goto close_file; // colors used 552 if (!read_uint(map, fsize, &position, &dword)) goto close_file; // colors used
553 colorsused = dword; 553 //colorsused = dword;
554 if (!read_uint(map, fsize, &position, &dword)) goto close_file; // colors important 554 if (!read_uint(map, fsize, &position, &dword)) goto close_file; // colors important
555 colorsimportant = dword; 555 //colorsimportant = dword;
556 556
557 evas_cache_image_surface_alloc(ie, ie->w, ie->h); 557 evas_cache_image_surface_alloc(ie, ie->w, ie->h);
558 surface = evas_cache_image_pixels(ie); 558 surface = evas_cache_image_pixels(ie);