evas: Fix can't open tiff file on loader 65/128465/2
authorjiin.moon <jiin.moon@samsung.com>
Wed, 10 May 2017 06:10:17 +0000 (15:10 +0900)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Thu, 11 May 2017 04:37:10 +0000 (04:37 +0000)
Refs: v1.19.0-423-gc89bf7b
Author:     jiin.moon <jiin.moon@samsung.com>
AuthorDate: Mon May 8 15:20:01 2017 +0200
Commit:     Stefan Schmidt <stefan@osg.samsung.com>
CommitDate: Mon May 8 15:20:01 2017 +0200

    evas: Fix can't open tiff file on loader

    Summary:
    Evas can't open tiff file because of no implement in client read api.
    I wrote codes simply for open.

    Test Plan: self

    Reviewers: jpeg, cedric, jypark

    Subscribers: stefan_schmidt

    Differential Revision: https://phab.enlightenment.org/D4857

Change-Id: Iae59a0a918a0e123bdce457df4207e341a55ef4d

src/modules/evas/image_loaders/tiff/evas_image_load_tiff.c

index 943c3e7..9f135ba 100644 (file)
@@ -42,11 +42,15 @@ struct TIFFRGBAMap {
 };
 
 static tsize_t
-_evas_tiff_RWProc(thandle_t handle EINA_UNUSED,
-                  tdata_t data EINA_UNUSED,
-                  tsize_t size EINA_UNUSED)
+_evas_tiff_RWProc(thandle_t handle,
+                  tdata_t data,
+                  tsize_t size)
 {
-   return 0;
+   TIFFRGBAMap *map = (TIFFRGBAMap*) handle;
+   if (!data) return 0;
+   memcpy(data, map->mem, size);
+
+   return size;
 }
 
 static toff_t