tweak docs; fix compile error in UNUSED_PARAM stuff
This commit is contained in:
@ -124,6 +124,23 @@ inline float mtfrand()
|
||||
return (float)(mtrand() % ninenine)/ninenine;
|
||||
}
|
||||
|
||||
static void resizer(int argc, char **argv)
|
||||
{
|
||||
unsigned char* input_pixels;
|
||||
unsigned char* output_pixels;
|
||||
int w, h;
|
||||
int n;
|
||||
int out_w, out_h;
|
||||
input_pixels = stbi_load(argv[1], &w, &h, &n, 0);
|
||||
out_w = w/4;
|
||||
out_h = h/4;
|
||||
output_pixels = (unsigned char*) malloc(out_w*out_h*n);
|
||||
//stbir_resize_uint8_srgb(input_pixels, w, h, 0, output_pixels, out_w, out_h, 0, n, -1,0);
|
||||
stbir_resize_uint8(input_pixels, w, h, 0, output_pixels, out_w, out_h, 0, n);
|
||||
stbi_write_png("output.png", out_w, out_h, n, output_pixels, 0);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
void test_suite(int argc, char **argv);
|
||||
|
||||
@ -135,6 +152,8 @@ int main(int argc, char** argv)
|
||||
int n;
|
||||
int out_w, out_h, out_stride;
|
||||
|
||||
//resizer(argc, argv);
|
||||
|
||||
#if 1
|
||||
test_suite(argc, argv);
|
||||
return 0;
|
||||
@ -733,6 +752,12 @@ void test_filters(void)
|
||||
STBIR_ASSERT(output[2] == input[1]);
|
||||
}
|
||||
|
||||
// checkerboard
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
{
|
||||
// Now for some fun.
|
||||
unsigned char input[2 * 1];
|
||||
|
Reference in New Issue
Block a user