different sizing methods.
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@59329
7cbeb6ba-43b4-40fd-8cce-
4c39aea84d33
h2 = (ie->load_opts.w * h) / w;
if (h2 > ie->load_opts.h)
{
- unsigned int w3;
h2 = ie->load_opts.h;
- w3 = (ie->load_opts.h * w) / h;
- if (w3 > w2)
- w2 = w3;
+ w2 = (ie->load_opts.h * w) / h;
}
w = w2;
h = h2;
}
if (w < 1) w = 1;
if (h < 1) h = 1;
+ if ((w != (int)ie->w) || (h != (int)ie->h))
+ {
+ *error = EVAS_LOAD_ERROR_GENERIC;
+ goto error;
+ }
ie->flags.alpha = 1;
evas_cache_image_surface_alloc(ie, w, h);
pixels = evas_cache_image_pixels(ie);