evas: Fix region test in jpeg load with region + zoom 25/87125/2
authorJean-Philippe Andre <jp.andre@samsung.com>
Wed, 17 Aug 2016 07:45:16 +0000 (16:45 +0900)
committerjiin.moon <jiin.moon@samsung.com>
Mon, 12 Sep 2016 07:58:02 +0000 (16:58 +0900)
The previous commit exposed an issue with the region test
does not take into account the scale down factor.

Not a @fix in itself, as it depends on the previous patch.

Change-Id: Ifb13aa0985989b240e8006b55ae92d616d929cb5

src/modules/evas/image_loaders/png/evas_image_load_png.c

index 15660af..3444c0f 100644 (file)
@@ -159,8 +159,8 @@ evas_image_load_file_head_png(void *loader_data,
 
    if (opts->region.w > 0 && opts->region.h > 0)
      {
-        if ((w32 < opts->region.x + opts->region.w) ||
-            (h32 < opts->region.y + opts->region.h))
+        if (((int) w32 < opts->region.x + opts->region.w) ||
+            ((int) h32 < opts->region.y + opts->region.h))
           {
              *error = EVAS_LOAD_ERROR_GENERIC;
              goto close_file;