evas_image_load_jpeg.c[svn 51774]:Evas JPEG loader: if both width and height scale...
authorshilpa singh <shilpa.singh@samsung.com>
Fri, 8 Oct 2010 13:41:07 +0000 (22:41 +0900)
committershilpa singh <shilpa.singh@samsung.com>
Fri, 8 Oct 2010 13:41:07 +0000 (22:41 +0900)
src/modules/loaders/jpeg/evas_image_load_jpeg.c

index 65f7fc7..005232c 100755 (executable)
@@ -136,8 +136,11 @@ evas_image_load_file_head_jpeg_internal(Image_Entry *ie, FILE *f, int *error)
             h2 = (ie->load_opts.w * h) / w;
             if ((ie->load_opts.h > 0) && (h2 > ie->load_opts.h))
               {
+                 int w3;
                  h2 = ie->load_opts.h;
-                 w2 = (ie->load_opts.h * w) / h;
+                 w3 = (ie->load_opts.h * w) / h;
+                 if (w3 > w2)
+                   w2 = w3;
               }
          }
        else if (ie->load_opts.h > 0)