maybe actually fix things correctly eh? -> images load again.

SVN revision: 52435
This commit is contained in:
Carsten Haitzler 2010-09-19 01:14:56 +00:00
parent d9aad06334
commit 857119a1c2
2 changed files with 4 additions and 4 deletions

View File

@ -150,9 +150,9 @@ evas_image_load_file_data_png(Image_Entry *ie, const char *file, const char *key
}
/* if we havent read the header before, set the header data */
if (E_FREAD(buf, 1, PNG_BYTES_TO_CHECK, f) != 1)
if (E_FREAD(buf, PNG_BYTES_TO_CHECK, 1, f) != 1)
{
*error = EVAS_LOAD_ERROR_CORRUPT_FILE;
*error = EVAS_LOAD_ERROR_CORRUPT_FILE;
goto close_file;
}
if (png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK))

View File

@ -151,11 +151,11 @@ evas_image_load_file_head_tiff(Image_Entry *ie, const char *file, const char *ke
if (fread(&magic_number, sizeof(uint16), 1, ffile) != 1)
{
fclose(ffile);
*error = EVAS_LOAD_ERROR_GENERIC;
*error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
return EINA_FALSE;
}
/* Apparently rewind(f) isn't sufficient */
fseek(ffile, (long)0, SEEK_SET);
fseek(ffile, 0, SEEK_SET);
if ((magic_number != TIFF_BIGENDIAN) /* Checks if actually tiff file */
&& (magic_number != TIFF_LITTLEENDIAN))