Check if image does not require resizing

This commit is contained in:
shooorf 2019-06-26 20:47:09 +03:00 committed by GitHub
parent 88cccfcad4
commit 993af0fb5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -1275,6 +1275,8 @@ float bilinear_interpolate(image im, float x, float y, int c)
image resize_image(image im, int w, int h)
{
if (im.w == w && im.h == h) return copy_image(im);
image resized = make_image(w, h, im.c);
image part = make_image(w, im.h, im.c);
int r, c, k;