Update(Submodule): stb_image
This commit is contained in:
parent
acbed604bb
commit
83acc50f64
2 changed files with 5047 additions and 5248 deletions
3406
Dependencies/stb_image/stb_image.c
vendored
3406
Dependencies/stb_image/stb_image.c
vendored
File diff suppressed because it is too large
Load diff
313
Dependencies/stb_image/stb_image.h
vendored
313
Dependencies/stb_image/stb_image.h
vendored
|
@ -1,4 +1,5 @@
|
||||||
/* stb_image - v2.26 - public domain image loader - http://nothings.org/stb
|
|
||||||
|
/* stb_image - v2.27 - public domain image loader - http://nothings.org/stb
|
||||||
no warranty implied; use at your own risk
|
no warranty implied; use at your own risk
|
||||||
|
|
||||||
Do this:
|
Do this:
|
||||||
|
@ -48,6 +49,7 @@ LICENSE
|
||||||
|
|
||||||
RECENT REVISION HISTORY:
|
RECENT REVISION HISTORY:
|
||||||
|
|
||||||
|
2.27 (2021-07-11) document stbi_info better, 16-bit PNM support, bug fixes
|
||||||
2.26 (2020-07-13) many minor fixes
|
2.26 (2020-07-13) many minor fixes
|
||||||
2.25 (2020-02-02) fix warnings
|
2.25 (2020-02-02) fix warnings
|
||||||
2.24 (2020-02-02) fix warnings; thread-local failure_reason and flip_vertically
|
2.24 (2020-02-02) fix warnings; thread-local failure_reason and flip_vertically
|
||||||
|
@ -89,7 +91,7 @@ RECENT REVISION HISTORY:
|
||||||
Jeremy Sawicki (handle all ImageNet JPGs)
|
Jeremy Sawicki (handle all ImageNet JPGs)
|
||||||
Optimizations & bugfixes Mikhail Morozov (1-bit BMP)
|
Optimizations & bugfixes Mikhail Morozov (1-bit BMP)
|
||||||
Fabian "ryg" Giesen Anael Seghezzi (is-16-bit query)
|
Fabian "ryg" Giesen Anael Seghezzi (is-16-bit query)
|
||||||
Arseny Kapoulkine
|
Arseny Kapoulkine Simon Breuss (16-bit PNM)
|
||||||
John-Mark Allen
|
John-Mark Allen
|
||||||
Carmelo J Fdez-Aguera
|
Carmelo J Fdez-Aguera
|
||||||
|
|
||||||
|
@ -102,7 +104,7 @@ RECENT REVISION HISTORY:
|
||||||
Thomas Ruf Ronny Chevalier github:rlyeh
|
Thomas Ruf Ronny Chevalier github:rlyeh
|
||||||
Janez Zemva John Bartholomew Michal Cichon github:romigrou
|
Janez Zemva John Bartholomew Michal Cichon github:romigrou
|
||||||
Jonathan Blow Ken Hamada Tero Hanninen github:svdijk
|
Jonathan Blow Ken Hamada Tero Hanninen github:svdijk
|
||||||
Laurent Gomila Cort Stratton github:snagar
|
Eugene Golushkov Laurent Gomila Cort Stratton github:snagar
|
||||||
Aruelien Pocheville Sergio Gonzalez Thibault Reuille github:Zelex
|
Aruelien Pocheville Sergio Gonzalez Thibault Reuille github:Zelex
|
||||||
Cass Everitt Ryamond Barbiero github:grim210
|
Cass Everitt Ryamond Barbiero github:grim210
|
||||||
Paul Du Bois Engin Manap Aldo Culquicondor github:sammyhw
|
Paul Du Bois Engin Manap Aldo Culquicondor github:sammyhw
|
||||||
|
@ -110,11 +112,13 @@ RECENT REVISION HISTORY:
|
||||||
Josh Tobin Matthew Gregan github:poppolopoppo
|
Josh Tobin Matthew Gregan github:poppolopoppo
|
||||||
Julian Raschke Gregory Mullen Christian Floisand github:darealshinji
|
Julian Raschke Gregory Mullen Christian Floisand github:darealshinji
|
||||||
Baldur Karlsson Kevin Schmidt JR Smith github:Michaelangel007
|
Baldur Karlsson Kevin Schmidt JR Smith github:Michaelangel007
|
||||||
Brad Weinberger Matvey Cherevko [reserved]
|
Brad Weinberger Matvey Cherevko github:mosra
|
||||||
Luca Sas Alexander Veselov Zack Middleton [reserved]
|
Luca Sas Alexander Veselov Zack Middleton [reserved]
|
||||||
Ryan C. Gordon [reserved] [reserved]
|
Ryan C. Gordon [reserved] [reserved]
|
||||||
DO NOT ADD YOUR NAME HERE
|
DO NOT ADD YOUR NAME HERE
|
||||||
|
|
||||||
|
Jacko Dirks
|
||||||
|
|
||||||
To add your name to the credits, pick a random blank space in the middle and fill it.
|
To add your name to the credits, pick a random blank space in the middle and fill it.
|
||||||
80% of merge conflicts on stb PRs are due to people adding their name at the end
|
80% of merge conflicts on stb PRs are due to people adding their name at the end
|
||||||
of the credits.
|
of the credits.
|
||||||
|
@ -176,6 +180,32 @@ RECENT REVISION HISTORY:
|
||||||
//
|
//
|
||||||
// Paletted PNG, BMP, GIF, and PIC images are automatically depalettized.
|
// Paletted PNG, BMP, GIF, and PIC images are automatically depalettized.
|
||||||
//
|
//
|
||||||
|
// To query the width, height and component count of an image without having to
|
||||||
|
// decode the full file, you can use the stbi_info family of functions:
|
||||||
|
//
|
||||||
|
// int x,y,n,ok;
|
||||||
|
// ok = stbi_info(filename, &x, &y, &n);
|
||||||
|
// // returns ok=1 and sets x, y, n if image is a supported format,
|
||||||
|
// // 0 otherwise.
|
||||||
|
//
|
||||||
|
// Note that stb_image pervasively uses ints in its public API for sizes,
|
||||||
|
// including sizes of memory buffers. This is now part of the API and thus
|
||||||
|
// hard to change without causing breakage. As a result, the various image
|
||||||
|
// loaders all have certain limits on image size; these differ somewhat
|
||||||
|
// by format but generally boil down to either just under 2GB or just under
|
||||||
|
// 1GB. When the decoded image would be larger than this, stb_image decoding
|
||||||
|
// will fail.
|
||||||
|
//
|
||||||
|
// Additionally, stb_image will reject image files that have any of their
|
||||||
|
// dimensions set to a larger value than the configurable STBI_MAX_DIMENSIONS,
|
||||||
|
// which defaults to 2**24 = 16777216 pixels. Due to the above memory limit,
|
||||||
|
// the only way to have an image with such dimensions load correctly
|
||||||
|
// is for it to have a rather extreme aspect ratio. Either way, the
|
||||||
|
// assumption here is that such larger images are likely to be malformed
|
||||||
|
// or malicious. If you do need to load an image with individual dimensions
|
||||||
|
// larger than that, and it still fits in the overall size limit, you can
|
||||||
|
// #define STBI_MAX_DIMENSIONS on your own to be something larger.
|
||||||
|
//
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
//
|
//
|
||||||
// UNICODE:
|
// UNICODE:
|
||||||
|
@ -281,11 +311,10 @@ RECENT REVISION HISTORY:
|
||||||
//
|
//
|
||||||
// iPhone PNG support:
|
// iPhone PNG support:
|
||||||
//
|
//
|
||||||
// By default we convert iphone-formatted PNGs back to RGB, even though
|
// We optionally support converting iPhone-formatted PNGs (which store
|
||||||
// they are internally encoded differently. You can disable this conversion
|
// premultiplied BGRA) back to RGB, even though they're internally encoded
|
||||||
// by calling stbi_convert_iphone_png_to_rgb(0), in which case
|
// differently. To enable this conversion, call
|
||||||
// you will always just get the native iphone "format" through (which
|
// stbi_convert_iphone_png_to_rgb(1).
|
||||||
// is BGR stored in RGB).
|
|
||||||
//
|
//
|
||||||
// Call stbi_set_unpremultiply_on_load(1) as well to force a divide per
|
// Call stbi_set_unpremultiply_on_load(1) as well to force a divide per
|
||||||
// pixel to remove any premultiplied alpha *only* if the image file explicitly
|
// pixel to remove any premultiplied alpha *only* if the image file explicitly
|
||||||
|
@ -337,7 +366,7 @@ RECENT REVISION HISTORY:
|
||||||
// very big.
|
// very big.
|
||||||
|
|
||||||
#ifndef STBI_NO_STDIO
|
#ifndef STBI_NO_STDIO
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#endif // STBI_NO_STDIO
|
#endif // STBI_NO_STDIO
|
||||||
|
|
||||||
#define STBI_VERSION 1
|
#define STBI_VERSION 1
|
||||||
|
@ -357,15 +386,16 @@ typedef unsigned char stbi_uc;
|
||||||
typedef unsigned short stbi_us;
|
typedef unsigned short stbi_us;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C"
|
||||||
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef STBIDEF
|
#ifndef STBIDEF
|
||||||
#ifdef STB_IMAGE_STATIC
|
#ifdef STB_IMAGE_STATIC
|
||||||
#define STBIDEF static
|
#define STBIDEF static
|
||||||
#else
|
#else
|
||||||
#define STBIDEF extern
|
#define STBIDEF extern
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -379,9 +409,9 @@ extern "C" {
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int (*read) (void* user, char* data, int size); // fill 'data' with 'size' bytes. return number of bytes actually read
|
int (*read)(void* user, char* data, int size); // fill 'data' with 'size' bytes. return number of bytes actually read
|
||||||
void (*skip) (void* user, int n); // skip the next 'n' bytes, or 'unget' the last -n bytes if negative
|
void (*skip)(void* user, int n); // skip the next 'n' bytes, or 'unget' the last -n bytes if negative
|
||||||
int (*eof) (void* user); // returns nonzero if we are at end of file/data
|
int (*eof)(void* user); // returns nonzero if we are at end of file/data
|
||||||
} stbi_io_callbacks;
|
} stbi_io_callbacks;
|
||||||
|
|
||||||
////////////////////////////////////
|
////////////////////////////////////
|
||||||
|
@ -395,7 +425,7 @@ extern "C" {
|
||||||
#ifndef STBI_NO_STDIO
|
#ifndef STBI_NO_STDIO
|
||||||
STBIDEF stbi_uc* stbi_load(char const* filename, int* x, int* y, int* channels_in_file, int desired_channels);
|
STBIDEF stbi_uc* stbi_load(char const* filename, int* x, int* y, int* channels_in_file, int desired_channels);
|
||||||
STBIDEF stbi_uc* stbi_load_from_file(FILE* f, int* x, int* y, int* channels_in_file, int desired_channels);
|
STBIDEF stbi_uc* stbi_load_from_file(FILE* f, int* x, int* y, int* channels_in_file, int desired_channels);
|
||||||
// for stbi_load_from_file, file pointer is left pointing immediately after image
|
// for stbi_load_from_file, file pointer is left pointing immediately after image
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef STBI_NO_GIF
|
#ifndef STBI_NO_GIF
|
||||||
|
@ -419,18 +449,18 @@ extern "C" {
|
||||||
STBIDEF stbi_us* stbi_load_from_file_16(FILE* f, int* x, int* y, int* channels_in_file, int desired_channels);
|
STBIDEF stbi_us* stbi_load_from_file_16(FILE* f, int* x, int* y, int* channels_in_file, int desired_channels);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
////////////////////////////////////
|
////////////////////////////////////
|
||||||
//
|
//
|
||||||
// float-per-channel interface
|
// float-per-channel interface
|
||||||
//
|
//
|
||||||
#ifndef STBI_NO_LINEAR
|
#ifndef STBI_NO_LINEAR
|
||||||
STBIDEF float* stbi_loadf_from_memory(stbi_uc const* buffer, int len, int* x, int* y, int* channels_in_file, int desired_channels);
|
STBIDEF float* stbi_loadf_from_memory(stbi_uc const* buffer, int len, int* x, int* y, int* channels_in_file, int desired_channels);
|
||||||
STBIDEF float* stbi_loadf_from_callbacks(stbi_io_callbacks const* clbk, void* user, int* x, int* y, int* channels_in_file, int desired_channels);
|
STBIDEF float* stbi_loadf_from_callbacks(stbi_io_callbacks const* clbk, void* user, int* x, int* y, int* channels_in_file, int desired_channels);
|
||||||
|
|
||||||
#ifndef STBI_NO_STDIO
|
#ifndef STBI_NO_STDIO
|
||||||
STBIDEF float* stbi_loadf(char const* filename, int* x, int* y, int* channels_in_file, int desired_channels);
|
STBIDEF float* stbi_loadf(char const* filename, int* x, int* y, int* channels_in_file, int desired_channels);
|
||||||
STBIDEF float* stbi_loadf_from_file(FILE* f, int* x, int* y, int* channels_in_file, int desired_channels);
|
STBIDEF float* stbi_loadf_from_file(FILE* f, int* x, int* y, int* channels_in_file, int desired_channels);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef STBI_NO_HDR
|
#ifndef STBI_NO_HDR
|
||||||
|
@ -473,7 +503,6 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// for image formats that explicitly notate that they have premultiplied alpha,
|
// for image formats that explicitly notate that they have premultiplied alpha,
|
||||||
// we just return the colors as stored in the file. set this flag to force
|
// we just return the colors as stored in the file. set this flag to force
|
||||||
// unpremultiplication. results are undefined if the unpremultiply overflow.
|
// unpremultiplication. results are undefined if the unpremultiply overflow.
|
||||||
|
@ -489,6 +518,8 @@ extern "C" {
|
||||||
// as above, but only applies to images loaded on the thread that calls the function
|
// as above, but only applies to images loaded on the thread that calls the function
|
||||||
// this function is only available if your compiler supports thread-local variables;
|
// this function is only available if your compiler supports thread-local variables;
|
||||||
// calling it will fail to link if your compiler doesn't
|
// calling it will fail to link if your compiler doesn't
|
||||||
|
STBIDEF void stbi_set_unpremultiply_on_load_thread(int flag_true_if_should_unpremultiply);
|
||||||
|
STBIDEF void stbi_convert_iphone_png_to_rgb_thread(int flag_true_if_should_convert);
|
||||||
STBIDEF void stbi_set_flip_vertically_on_load_thread(int flag_true_if_should_flip);
|
STBIDEF void stbi_set_flip_vertically_on_load_thread(int flag_true_if_should_flip);
|
||||||
|
|
||||||
// ZLIB client - used by PNG, available for other purposes
|
// ZLIB client - used by PNG, available for other purposes
|
||||||
|
@ -506,233 +537,5 @@ extern "C" {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//// end header file /////////////////////////////////////////////////////
|
//// end header file /////////////////////////////////////////////////////
|
||||||
#endif // STBI_INCLUDE_STB_IMAGE_H
|
#endif // STBI_INCLUDE_STB_IMAGE_H
|
||||||
|
|
||||||
/*
|
|
||||||
revision history:
|
|
||||||
2.20 (2019-02-07) support utf8 filenames in Windows; fix warnings and platform ifdefs
|
|
||||||
2.19 (2018-02-11) fix warning
|
|
||||||
2.18 (2018-01-30) fix warnings
|
|
||||||
2.17 (2018-01-29) change sbti__shiftsigned to avoid clang -O2 bug
|
|
||||||
1-bit BMP
|
|
||||||
*_is_16_bit api
|
|
||||||
avoid warnings
|
|
||||||
2.16 (2017-07-23) all functions have 16-bit variants;
|
|
||||||
STBI_NO_STDIO works again;
|
|
||||||
compilation fixes;
|
|
||||||
fix rounding in unpremultiply;
|
|
||||||
optimize vertical flip;
|
|
||||||
disable raw_len validation;
|
|
||||||
documentation fixes
|
|
||||||
2.15 (2017-03-18) fix png-1,2,4 bug; now all Imagenet JPGs decode;
|
|
||||||
warning fixes; disable run-time SSE detection on gcc;
|
|
||||||
uniform handling of optional "return" values;
|
|
||||||
thread-safe initialization of zlib tables
|
|
||||||
2.14 (2017-03-03) remove deprecated STBI_JPEG_OLD; fixes for Imagenet JPGs
|
|
||||||
2.13 (2016-11-29) add 16-bit API, only supported for PNG right now
|
|
||||||
2.12 (2016-04-02) fix typo in 2.11 PSD fix that caused crashes
|
|
||||||
2.11 (2016-04-02) allocate large structures on the stack
|
|
||||||
remove white matting for transparent PSD
|
|
||||||
fix reported channel count for PNG & BMP
|
|
||||||
re-enable SSE2 in non-gcc 64-bit
|
|
||||||
support RGB-formatted JPEG
|
|
||||||
read 16-bit PNGs (only as 8-bit)
|
|
||||||
2.10 (2016-01-22) avoid warning introduced in 2.09 by STBI_REALLOC_SIZED
|
|
||||||
2.09 (2016-01-16) allow comments in PNM files
|
|
||||||
16-bit-per-pixel TGA (not bit-per-component)
|
|
||||||
info() for TGA could break due to .hdr handling
|
|
||||||
info() for BMP to shares code instead of sloppy parse
|
|
||||||
can use STBI_REALLOC_SIZED if allocator doesn't support realloc
|
|
||||||
code cleanup
|
|
||||||
2.08 (2015-09-13) fix to 2.07 cleanup, reading RGB PSD as RGBA
|
|
||||||
2.07 (2015-09-13) fix compiler warnings
|
|
||||||
partial animated GIF support
|
|
||||||
limited 16-bpc PSD support
|
|
||||||
#ifdef unused functions
|
|
||||||
bug with < 92 byte PIC,PNM,HDR,TGA
|
|
||||||
2.06 (2015-04-19) fix bug where PSD returns wrong '*comp' value
|
|
||||||
2.05 (2015-04-19) fix bug in progressive JPEG handling, fix warning
|
|
||||||
2.04 (2015-04-15) try to re-enable SIMD on MinGW 64-bit
|
|
||||||
2.03 (2015-04-12) extra corruption checking (mmozeiko)
|
|
||||||
stbi_set_flip_vertically_on_load (nguillemot)
|
|
||||||
fix NEON support; fix mingw support
|
|
||||||
2.02 (2015-01-19) fix incorrect assert, fix warning
|
|
||||||
2.01 (2015-01-17) fix various warnings; suppress SIMD on gcc 32-bit without -msse2
|
|
||||||
2.00b (2014-12-25) fix STBI_MALLOC in progressive JPEG
|
|
||||||
2.00 (2014-12-25) optimize JPG, including x86 SSE2 & NEON SIMD (ryg)
|
|
||||||
progressive JPEG (stb)
|
|
||||||
PGM/PPM support (Ken Miller)
|
|
||||||
STBI_MALLOC,STBI_REALLOC,STBI_FREE
|
|
||||||
GIF bugfix -- seemingly never worked
|
|
||||||
STBI_NO_*, STBI_ONLY_*
|
|
||||||
1.48 (2014-12-14) fix incorrectly-named assert()
|
|
||||||
1.47 (2014-12-14) 1/2/4-bit PNG support, both direct and paletted (Omar Cornut & stb)
|
|
||||||
optimize PNG (ryg)
|
|
||||||
fix bug in interlaced PNG with user-specified channel count (stb)
|
|
||||||
1.46 (2014-08-26)
|
|
||||||
fix broken tRNS chunk (colorkey-style transparency) in non-paletted PNG
|
|
||||||
1.45 (2014-08-16)
|
|
||||||
fix MSVC-ARM internal compiler error by wrapping malloc
|
|
||||||
1.44 (2014-08-07)
|
|
||||||
various warning fixes from Ronny Chevalier
|
|
||||||
1.43 (2014-07-15)
|
|
||||||
fix MSVC-only compiler problem in code changed in 1.42
|
|
||||||
1.42 (2014-07-09)
|
|
||||||
don't define _CRT_SECURE_NO_WARNINGS (affects user code)
|
|
||||||
fixes to stbi__cleanup_jpeg path
|
|
||||||
added STBI_ASSERT to avoid requiring assert.h
|
|
||||||
1.41 (2014-06-25)
|
|
||||||
fix search&replace from 1.36 that messed up comments/error messages
|
|
||||||
1.40 (2014-06-22)
|
|
||||||
fix gcc struct-initialization warning
|
|
||||||
1.39 (2014-06-15)
|
|
||||||
fix to TGA optimization when req_comp != number of components in TGA;
|
|
||||||
fix to GIF loading because BMP wasn't rewinding (whoops, no GIFs in my test suite)
|
|
||||||
add support for BMP version 5 (more ignored fields)
|
|
||||||
1.38 (2014-06-06)
|
|
||||||
suppress MSVC warnings on integer casts truncating values
|
|
||||||
fix accidental rename of 'skip' field of I/O
|
|
||||||
1.37 (2014-06-04)
|
|
||||||
remove duplicate typedef
|
|
||||||
1.36 (2014-06-03)
|
|
||||||
convert to header file single-file library
|
|
||||||
if de-iphone isn't set, load iphone images color-swapped instead of returning NULL
|
|
||||||
1.35 (2014-05-27)
|
|
||||||
various warnings
|
|
||||||
fix broken STBI_SIMD path
|
|
||||||
fix bug where stbi_load_from_file no longer left file pointer in correct place
|
|
||||||
fix broken non-easy path for 32-bit BMP (possibly never used)
|
|
||||||
TGA optimization by Arseny Kapoulkine
|
|
||||||
1.34 (unknown)
|
|
||||||
use STBI_NOTUSED in stbi__resample_row_generic(), fix one more leak in tga failure case
|
|
||||||
1.33 (2011-07-14)
|
|
||||||
make stbi_is_hdr work in STBI_NO_HDR (as specified), minor compiler-friendly improvements
|
|
||||||
1.32 (2011-07-13)
|
|
||||||
support for "info" function for all supported filetypes (SpartanJ)
|
|
||||||
1.31 (2011-06-20)
|
|
||||||
a few more leak fixes, bug in PNG handling (SpartanJ)
|
|
||||||
1.30 (2011-06-11)
|
|
||||||
added ability to load files via callbacks to accomidate custom input streams (Ben Wenger)
|
|
||||||
removed deprecated format-specific test/load functions
|
|
||||||
removed support for installable file formats (stbi_loader) -- would have been broken for IO callbacks anyway
|
|
||||||
error cases in bmp and tga give messages and don't leak (Raymond Barbiero, grisha)
|
|
||||||
fix inefficiency in decoding 32-bit BMP (David Woo)
|
|
||||||
1.29 (2010-08-16)
|
|
||||||
various warning fixes from Aurelien Pocheville
|
|
||||||
1.28 (2010-08-01)
|
|
||||||
fix bug in GIF palette transparency (SpartanJ)
|
|
||||||
1.27 (2010-08-01)
|
|
||||||
cast-to-stbi_uc to fix warnings
|
|
||||||
1.26 (2010-07-24)
|
|
||||||
fix bug in file buffering for PNG reported by SpartanJ
|
|
||||||
1.25 (2010-07-17)
|
|
||||||
refix trans_data warning (Won Chun)
|
|
||||||
1.24 (2010-07-12)
|
|
||||||
perf improvements reading from files on platforms with lock-heavy fgetc()
|
|
||||||
minor perf improvements for jpeg
|
|
||||||
deprecated type-specific functions so we'll get feedback if they're needed
|
|
||||||
attempt to fix trans_data warning (Won Chun)
|
|
||||||
1.23 fixed bug in iPhone support
|
|
||||||
1.22 (2010-07-10)
|
|
||||||
removed image *writing* support
|
|
||||||
stbi_info support from Jetro Lauha
|
|
||||||
GIF support from Jean-Marc Lienher
|
|
||||||
iPhone PNG-extensions from James Brown
|
|
||||||
warning-fixes from Nicolas Schulz and Janez Zemva (i.stbi__err. Janez (U+017D)emva)
|
|
||||||
1.21 fix use of 'stbi_uc' in header (reported by jon blow)
|
|
||||||
1.20 added support for Softimage PIC, by Tom Seddon
|
|
||||||
1.19 bug in interlaced PNG corruption check (found by ryg)
|
|
||||||
1.18 (2008-08-02)
|
|
||||||
fix a threading bug (local mutable static)
|
|
||||||
1.17 support interlaced PNG
|
|
||||||
1.16 major bugfix - stbi__convert_format converted one too many pixels
|
|
||||||
1.15 initialize some fields for thread safety
|
|
||||||
1.14 fix threadsafe conversion bug
|
|
||||||
header-file-only version (#define STBI_HEADER_FILE_ONLY before including)
|
|
||||||
1.13 threadsafe
|
|
||||||
1.12 const qualifiers in the API
|
|
||||||
1.11 Support installable IDCT, colorspace conversion routines
|
|
||||||
1.10 Fixes for 64-bit (don't use "unsigned long")
|
|
||||||
optimized upsampling by Fabian "ryg" Giesen
|
|
||||||
1.09 Fix format-conversion for PSD code (bad global variables!)
|
|
||||||
1.08 Thatcher Ulrich's PSD code integrated by Nicolas Schulz
|
|
||||||
1.07 attempt to fix C++ warning/errors again
|
|
||||||
1.06 attempt to fix C++ warning/errors again
|
|
||||||
1.05 fix TGA loading to return correct *comp and use good luminance calc
|
|
||||||
1.04 default float alpha is 1, not 255; use 'void *' for stbi_image_free
|
|
||||||
1.03 bugfixes to STBI_NO_STDIO, STBI_NO_HDR
|
|
||||||
1.02 support for (subset of) HDR files, float interface for preferred access to them
|
|
||||||
1.01 fix bug: possible bug in handling right-side up bmps... not sure
|
|
||||||
fix bug: the stbi__bmp_load() and stbi__tga_load() functions didn't work at all
|
|
||||||
1.00 interface to zlib that skips zlib header
|
|
||||||
0.99 correct handling of alpha in palette
|
|
||||||
0.98 TGA loader by lonesock; dynamically add loaders (untested)
|
|
||||||
0.97 jpeg errors on too large a file; also catch another malloc failure
|
|
||||||
0.96 fix detection of invalid v value - particleman@mollyrocket forum
|
|
||||||
0.95 during header scan, seek to markers in case of padding
|
|
||||||
0.94 STBI_NO_STDIO to disable stdio usage; rename all #defines the same
|
|
||||||
0.93 handle jpegtran output; verbose errors
|
|
||||||
0.92 read 4,8,16,24,32-bit BMP files of several formats
|
|
||||||
0.91 output 24-bit Windows 3.0 BMP files
|
|
||||||
0.90 fix a few more warnings; bump version number to approach 1.0
|
|
||||||
0.61 bugfixes due to Marc LeBlanc, Christopher Lloyd
|
|
||||||
0.60 fix compiling as c++
|
|
||||||
0.59 fix warnings: merge Dave Moore's -Wall fixes
|
|
||||||
0.58 fix bug: zlib uncompressed mode len/nlen was wrong endian
|
|
||||||
0.57 fix bug: jpg last huffman symbol before marker was >9 bits but less than 16 available
|
|
||||||
0.56 fix bug: zlib uncompressed mode len vs. nlen
|
|
||||||
0.55 fix bug: restart_interval not initialized to 0
|
|
||||||
0.54 allow NULL for 'int *comp'
|
|
||||||
0.53 fix bug in png 3->4; speedup png decoding
|
|
||||||
0.52 png handles req_comp=3,4 directly; minor cleanup; jpeg comments
|
|
||||||
0.51 obey req_comp requests, 1-component jpegs return as 1-component,
|
|
||||||
on 'test' only check type, not whether we support this variant
|
|
||||||
0.50 (2006-11-19)
|
|
||||||
first released version
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
This software is available under 2 licenses -- choose whichever you prefer.
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
ALTERNATIVE A - MIT License
|
|
||||||
Copyright (c) 2017 Sean Barrett
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
this software and associated documentation files (the "Software"), to deal in
|
|
||||||
the Software without restriction, including without limitation the rights to
|
|
||||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
so, subject to the following conditions:
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
ALTERNATIVE B - Public Domain (www.unlicense.org)
|
|
||||||
This is free and unencumbered software released into the public domain.
|
|
||||||
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
|
|
||||||
software, either in source code form or as a compiled binary, for any purpose,
|
|
||||||
commercial or non-commercial, and by any means.
|
|
||||||
In jurisdictions that recognize copyright laws, the author or authors of this
|
|
||||||
software dedicate any and all copyright interest in the software to the public
|
|
||||||
domain. We make this dedication for the benefit of the public at large and to
|
|
||||||
the detriment of our heirs and successors. We intend this dedication to be an
|
|
||||||
overt act of relinquishment in perpetuity of all present and future rights to
|
|
||||||
this software under copyright law.
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
|
||||||
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue