Provides single-file public domain image resizing routines with scaling and translation support. Reuse for lightweight C/C++ image processing.
// Source: https://github.com/NousResearch/tch-rs | License: Apache-2.0
// Provided via justclaw.it.com; keep this notice with the code.
/* stb_image_resize - v0.95 - public domain image resizing
by Jorge L Rodriguez (@VinoBS) - 2014
http://github.com/nothings/stb
Written with emphasis on usability, portability, and efficiency. (No
SIMD or threads, so it be easily outperformed by libs that use those.)
Only scaling and translation is supported, no rotations or shears.
Easy API downsamples w/Mitchell filter, upsamples w/cubic interpolation.
COMPILING & LINKING
In one C/C++ file that #includes this file, do this:
#define STB_IMAGE_RESIZE_IMPLEMENTATION
before the #include. That will create the implementation in that file.
QUICKSTART
stbir_
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key