Merge commit '04b33820291e8574ea2618aead9cd0be6a4df56b'
This commit is contained in:
13
external/stb/stb/tests/resample_test.cpp
vendored
13
external/stb/stb/tests/resample_test.cpp
vendored
@ -64,7 +64,7 @@ void stbir_progress(float p)
|
||||
#define STBIR_PROGRESS_REPORT stbir_progress
|
||||
#define STB_IMAGE_RESIZE_IMPLEMENTATION
|
||||
#define STB_IMAGE_RESIZE_STATIC
|
||||
#include "stb_image_resize.h"
|
||||
#include "stb_image_resize2.h"
|
||||
|
||||
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
||||
#include "stb_image_write.h"
|
||||
@ -143,7 +143,7 @@ void resizer(int argc, char **argv)
|
||||
out_h = h*3;
|
||||
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);
|
||||
stbir_resize_uint8_linear(input_pixels, w, h, 0, output_pixels, out_w, out_h, 0, (stbir_pixel_layout) n);
|
||||
stbi_write_png("output.png", out_w, out_h, n, output_pixels, 0);
|
||||
exit(0);
|
||||
}
|
||||
@ -171,9 +171,9 @@ void performance(int argc, char **argv)
|
||||
output_pixels = (unsigned char*) malloc(out_w*out_h*n);
|
||||
for (i=0; i < count; ++i)
|
||||
if (srgb)
|
||||
stbir_resize_uint8_srgb(input_pixels, w, h, 0, output_pixels, out_w, out_h, 0, n,-1,0);
|
||||
stbir_resize_uint8_srgb(input_pixels, w, h, 0, output_pixels, out_w, out_h, 0, (stbir_pixel_layout) n);
|
||||
else
|
||||
stbir_resize(input_pixels, w, h, 0, output_pixels, out_w, out_h, 0, STBIR_TYPE_UINT8, n,-1, 0, STBIR_EDGE_CLAMP, STBIR_EDGE_CLAMP, STBIR_FILTER_DEFAULT, STBIR_FILTER_DEFAULT, STBIR_COLORSPACE_LINEAR, NULL);
|
||||
stbir_resize_uint8_linear(input_pixels, w, h, 0, output_pixels, out_w, out_h, 0, (stbir_pixel_layout) n);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@ -188,6 +188,7 @@ int main(int argc, char** argv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
void resize_image(const char* filename, float width_percent, float height_percent, stbir_filter filter, stbir_edge edge, stbir_colorspace colorspace, const char* output_filename)
|
||||
{
|
||||
int w, h, n;
|
||||
@ -1120,3 +1121,7 @@ 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_dalai_lama_gray.jpg", .5f, .5f, STBIR_FILTER_CATMULLROM, STBIR_EDGE_REFLECT, STBIR_COLORSPACE_SRGB, "test-output/gamma_dalai_lama_gray.jpg");
|
||||
}
|
||||
#endif
|
||||
void test_suite(int argc, char **argv)
|
||||
{
|
||||
}
|
||||
|
2
external/stb/stb/tests/resize.dsp
vendored
2
external/stb/stb/tests/resize.dsp
vendored
@ -88,7 +88,7 @@ SOURCE=.\resample_test.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\stb_image_resize.h
|
||||
SOURCE=..\stb_image_resize2.h
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
|
4
external/stb/stb/tests/stb.dsp
vendored
4
external/stb/stb/tests/stb.dsp
vendored
@ -130,10 +130,6 @@ SOURCE=..\stb_image.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\stb_image_resize.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\stb_image_write.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
5
external/stb/stb/tests/test_c_compilation.c
vendored
5
external/stb/stb/tests/test_c_compilation.c
vendored
@ -1,3 +1,6 @@
|
||||
#define STB_IMAGE_RESIZE_IMPLEMENTATION
|
||||
#include "stb_image_resize2.h"
|
||||
|
||||
#define STB_SPRINTF_IMPLEMENTATION
|
||||
#include "stb_sprintf.h"
|
||||
|
||||
@ -7,7 +10,6 @@
|
||||
#define STB_DIVIDE_IMPLEMENTATION
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#define STB_HERRINGBONE_WANG_TILE_IMEPLEMENTATIOn
|
||||
#define STB_IMAGE_RESIZE_IMPLEMENTATION
|
||||
#define STB_RECT_PACK_IMPLEMENTATION
|
||||
#define STB_VOXEL_RENDER_IMPLEMENTATION
|
||||
#define STB_EASY_FONT_IMPLEMENTATION
|
||||
@ -20,7 +22,6 @@
|
||||
#include "stb_perlin.h"
|
||||
#include "stb_c_lexer.h"
|
||||
#include "stb_divide.h"
|
||||
#include "stb_image_resize.h"
|
||||
#include "stb_rect_pack.h"
|
||||
#include "stb_dxt.h"
|
||||
#include "stb_include.h"
|
||||
|
@ -70,7 +70,7 @@ void my_free(void *) { }
|
||||
#include "stb_leakcheck.h"
|
||||
|
||||
#define STB_IMAGE_RESIZE_IMPLEMENTATION
|
||||
#include "stb_image_resize.h"
|
||||
#include "stb_image_resize2.h"
|
||||
|
||||
//#include "stretchy_buffer.h" // deprecating
|
||||
|
||||
|
Reference in New Issue
Block a user