restore correct definition of box

This commit is contained in:
Sean Barrett 2014-09-07 04:07:07 -07:00
parent 08ca345839
commit 7da729bfce
2 changed files with 1 additions and 5 deletions

View File

@ -1,5 +1,3 @@
#define STBIR_DEBUG_OVERWRITE_TEST
/* stb_image_resize - v0.50 - public domain image resampling /* stb_image_resize - v0.50 - public domain image resampling
no warranty implied; use at your own risk no warranty implied; use at your own risk
@ -507,7 +505,7 @@ static unsigned char stbir__linear_to_srgb_uchar(float f)
static float stbir__filter_box(float x) static float stbir__filter_box(float x)
{ {
if (x < -0.5f) if (x <= -0.5f)
return 0; return 0;
else if (x > 0.5f) else if (x > 0.5f)
return 0; return 0;

View File

@ -720,5 +720,3 @@ void test_suite(int argc, char **argv)
resize_image("gamma_2.2.jpg", .5f, .5f, STBIR_FILTER_CATMULLROM, STBIR_EDGE_REFLECT, STBIR_COLORSPACE_SRGB, "test-output/gamma_2.2.jpg"); resize_image("gamma_2.2.jpg", .5f, .5f, STBIR_FILTER_CATMULLROM, STBIR_EDGE_REFLECT, STBIR_COLORSPACE_SRGB, "test-output/gamma_2.2.jpg");
resize_image("gamma_dalai_lama_gray.jpg", .5f, .5f, STBIR_FILTER_CATMULLROM, STBIR_EDGE_REFLECT, STBIR_COLORSPACE_SRGB, "test-output/gamma_dalai_lama_gray.jpg"); resize_image("gamma_dalai_lama_gray.jpg", .5f, .5f, STBIR_FILTER_CATMULLROM, STBIR_EDGE_REFLECT, STBIR_COLORSPACE_SRGB, "test-output/gamma_dalai_lama_gray.jpg");
} }