forked from enlightenment/efl
maybe actually fix things correctly eh? -> images load again.
SVN revision: 52435
This commit is contained in:
parent
d9aad06334
commit
857119a1c2
|
@ -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 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;
|
goto close_file;
|
||||||
}
|
}
|
||||||
if (png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK))
|
if (png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK))
|
||||||
|
|
|
@ -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)
|
if (fread(&magic_number, sizeof(uint16), 1, ffile) != 1)
|
||||||
{
|
{
|
||||||
fclose(ffile);
|
fclose(ffile);
|
||||||
*error = EVAS_LOAD_ERROR_GENERIC;
|
*error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
/* Apparently rewind(f) isn't sufficient */
|
/* 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 */
|
if ((magic_number != TIFF_BIGENDIAN) /* Checks if actually tiff file */
|
||||||
&& (magic_number != TIFF_LITTLEENDIAN))
|
&& (magic_number != TIFF_LITTLEENDIAN))
|
||||||
|
|
Loading…
Reference in New Issue