maybe actually fix things correctly eh? -> images load again.
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 19 Sep 2010 01:14:56 +0000 (01:14 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 19 Sep 2010 01:14:56 +0000 (01:14 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@52435 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/modules/loaders/png/evas_image_load_png.c
src/modules/loaders/tiff/evas_image_load_tiff.c

index 27f248d..a2fc17b 100644 (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))
index 6aa6675..2200f7f 100644 (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))