diff --git a/src/graphics.c b/src/graphics.c index 990fae5f8..a5593a273 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -144,13 +144,12 @@ pixel *resample_img(pixel *src, int sw, int sh, int rw, int rh) { int y, x; //int i,j,x,y,w,h,r,g,b,c; - pixel *q; - q = malloc(rw*rh*PIXELSIZE); + pixel *q = NULL; //TODO: Actual resampling, this is just cheap nearest pixel crap - //if(rw > sw && rh > sh){ - //if(1){ + if(rw > sw && rh > sh){ float fx, fy, fyc, fxc, intp; pixel tr, tl, br, bl; + q = malloc(rw*rh*PIXELSIZE); //Bilinear interpolation for upscaling for (y=0; y