resize image width 1 ><

This commit is contained in:
Joseph Redmon 2015-09-22 15:40:15 -07:00
parent 59e356730f
commit 54d761cf9e

View File

@ -591,7 +591,7 @@ image resize_image(image im, int w, int h)
for(r = 0; r < im.h; ++r){ for(r = 0; r < im.h; ++r){
for(c = 0; c < w; ++c){ for(c = 0; c < w; ++c){
float val = 0; float val = 0;
if(c == w-1){ if(c == w-1 || im.w == 1){
val = get_pixel(im, im.w-1, r, k); val = get_pixel(im, im.w-1, r, k);
} else { } else {
float sx = c*w_scale; float sx = c*w_scale;