Updated STB "libs".

This commit is contained in:
Бранимир Караџић
2020-06-13 13:38:18 -07:00
parent 17bcbaf414
commit 9854bc55bb
3 changed files with 1517 additions and 472 deletions

1017
3rdparty/stb/stb_image.h vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
/* stb_image_resize - v0.95 - public domain image resizing
/* stb_image_resize - v0.96 - public domain image resizing
by Jorge L Rodriguez (@VinoBS) - 2014
http://github.com/nothings/stb
@@ -159,6 +159,8 @@
Nathan Reed: warning fixes
REVISIONS
0.97 (2020-02-02) fixed warning
0.96 (2019-03-04) fixed warnings
0.95 (2017-07-23) fixed warnings
0.94 (2017-03-18) fixed warnings
0.93 (2017-03-03) fixed bug with certain combinations of heights
@@ -193,6 +195,7 @@ typedef uint16_t stbir_uint16;
typedef uint32_t stbir_uint32;
#endif
#ifndef STBIRDEF
#ifdef STB_IMAGE_RESIZE_STATIC
#define STBIRDEF static
#else
@@ -202,7 +205,7 @@ typedef uint32_t stbir_uint32;
#define STBIRDEF extern
#endif
#endif
#endif
//////////////////////////////////////////////////////////////////////////////
//
@@ -1236,7 +1239,7 @@ static float* stbir__get_decode_buffer(stbir__info* stbir_info)
return &stbir_info->decode_buffer[stbir_info->horizontal_filter_pixel_margin * stbir_info->channels];
}
#define STBIR__DECODE(type, colorspace) ((type) * (STBIR_MAX_COLORSPACES) + (colorspace))
#define STBIR__DECODE(type, colorspace) ((int)(type) * (STBIR_MAX_COLORSPACES) + (int)(colorspace))
static void stbir__decode_scanline(stbir__info* stbir_info, int n)
{
@@ -2324,8 +2327,9 @@ static int stbir__resize_allocated(stbir__info *info,
if (alpha_channel < 0)
flags |= STBIR_FLAG_ALPHA_USES_COLORSPACE | STBIR_FLAG_ALPHA_PREMULTIPLIED;
if (!(flags&STBIR_FLAG_ALPHA_USES_COLORSPACE) || !(flags&STBIR_FLAG_ALPHA_PREMULTIPLIED))
if (!(flags&STBIR_FLAG_ALPHA_USES_COLORSPACE) || !(flags&STBIR_FLAG_ALPHA_PREMULTIPLIED)) {
STBIR_ASSERT(alpha_channel >= 0 && alpha_channel < info->channels);
}
if (alpha_channel >= info->channels)
return 0;

File diff suppressed because it is too large Load Diff