|
@@ -453,8 +453,8 @@ STBIDEF int stbi_convert_wchar_to_utf8(char *buffer, size_t bufferlen, const wch
|
|
|
|
|
|
#if 0 /* not used in SDL */
|
|
#if 0 /* not used in SDL */
|
|
STBIDEF stbi_uc *stbi_load_from_memory_with_palette (stbi_uc const *buffer, int len , int *x, int *y, unsigned int *palette_buffer, int palette_buffer_len);
|
|
STBIDEF stbi_uc *stbi_load_from_memory_with_palette (stbi_uc const *buffer, int len , int *x, int *y, unsigned int *palette_buffer, int palette_buffer_len);
|
|
-STBIDEF stbi_uc *stbi_load_from_callbacks_with_palette(stbi_io_callbacks const *clbk, void *user, int *x, int *y, unsigned int *palette_buffer, int palette_buffer_len);
|
|
|
|
#endif
|
|
#endif
|
|
|
|
+STBIDEF stbi_uc *stbi_load_from_callbacks_with_palette(stbi_io_callbacks const *clbk, void *user, int *x, int *y, unsigned int *palette_buffer, int palette_buffer_len);
|
|
|
|
|
|
////////////////////////////////////
|
|
////////////////////////////////////
|
|
//
|
|
//
|
|
@@ -559,14 +559,18 @@ STBIDEF void stbi_set_flip_vertically_on_load_thread(int flag_true_if_should_fli
|
|
// ZLIB client - used by PNG, available for other purposes
|
|
// ZLIB client - used by PNG, available for other purposes
|
|
|
|
|
|
#ifndef STBI_NO_ZLIB
|
|
#ifndef STBI_NO_ZLIB
|
|
|
|
+#if 0 /* not used in SDL */
|
|
STBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen);
|
|
STBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen);
|
|
|
|
+#endif
|
|
STBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, int len, int initial_size, int *outlen, int parse_header);
|
|
STBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, int len, int initial_size, int *outlen, int parse_header);
|
|
|
|
+#if 0 /* not used in SDL */
|
|
STBIDEF char *stbi_zlib_decode_malloc(const char *buffer, int len, int *outlen);
|
|
STBIDEF char *stbi_zlib_decode_malloc(const char *buffer, int len, int *outlen);
|
|
STBIDEF int stbi_zlib_decode_buffer(char *obuffer, int olen, const char *ibuffer, int ilen);
|
|
STBIDEF int stbi_zlib_decode_buffer(char *obuffer, int olen, const char *ibuffer, int ilen);
|
|
|
|
|
|
STBIDEF char *stbi_zlib_decode_noheader_malloc(const char *buffer, int len, int *outlen);
|
|
STBIDEF char *stbi_zlib_decode_noheader_malloc(const char *buffer, int len, int *outlen);
|
|
STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen);
|
|
STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen);
|
|
#endif
|
|
#endif
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
#ifdef __cplusplus
|
|
@@ -897,7 +901,6 @@ static void stbi__start_mem(stbi__context *s, stbi_uc const *buffer, int len)
|
|
s->img_buffer_end = s->img_buffer_original_end = (stbi_uc *) buffer+len;
|
|
s->img_buffer_end = s->img_buffer_original_end = (stbi_uc *) buffer+len;
|
|
}
|
|
}
|
|
|
|
|
|
-#if 0 /* not used in SDL */
|
|
|
|
// initialize a callback-based context
|
|
// initialize a callback-based context
|
|
static void stbi__start_callbacks(stbi__context *s, stbi_io_callbacks *c, void *user)
|
|
static void stbi__start_callbacks(stbi__context *s, stbi_io_callbacks *c, void *user)
|
|
{
|
|
{
|
|
@@ -910,7 +913,6 @@ static void stbi__start_callbacks(stbi__context *s, stbi_io_callbacks *c, void *
|
|
stbi__refill_buffer(s);
|
|
stbi__refill_buffer(s);
|
|
s->img_buffer_original_end = s->img_buffer_end;
|
|
s->img_buffer_original_end = s->img_buffer_end;
|
|
}
|
|
}
|
|
-#endif
|
|
|
|
|
|
|
|
#ifndef STBI_NO_STDIO
|
|
#ifndef STBI_NO_STDIO
|
|
|
|
|
|
@@ -1353,7 +1355,6 @@ static void stbi__vertical_flip_slices(void *image, int w, int h, int z, int byt
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-#if 0 /* not used in SDL */
|
|
|
|
static unsigned char *stbi__load_indexed(stbi__context *s, int *x, int *y, unsigned int *palette_buffer, int palette_buffer_len)
|
|
static unsigned char *stbi__load_indexed(stbi__context *s, int *x, int *y, unsigned int *palette_buffer, int palette_buffer_len)
|
|
{
|
|
{
|
|
stbi__result_info ri;
|
|
stbi__result_info ri;
|
|
@@ -1386,7 +1387,6 @@ static unsigned char *stbi__load_indexed(stbi__context *s, int *x, int *y, unsig
|
|
|
|
|
|
return (unsigned char *) result;
|
|
return (unsigned char *) result;
|
|
}
|
|
}
|
|
-#endif /**/
|
|
|
|
|
|
|
|
static unsigned char *stbi__load_and_postprocess_8bit(stbi__context *s, int *x, int *y, int *comp, int req_comp)
|
|
static unsigned char *stbi__load_and_postprocess_8bit(stbi__context *s, int *x, int *y, int *comp, int req_comp)
|
|
{
|
|
{
|
|
@@ -1568,7 +1568,6 @@ STBIDEF stbi_uc *stbi_load_from_memory(stbi_uc const *buffer, int len, int *x, i
|
|
return stbi__load_and_postprocess_8bit(&s,x,y,comp,req_comp);
|
|
return stbi__load_and_postprocess_8bit(&s,x,y,comp,req_comp);
|
|
}
|
|
}
|
|
|
|
|
|
-#if 0 /* not used in SDL */
|
|
|
|
STBIDEF stbi_uc *stbi_load_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp)
|
|
STBIDEF stbi_uc *stbi_load_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp)
|
|
{
|
|
{
|
|
stbi__context s;
|
|
stbi__context s;
|
|
@@ -1576,12 +1575,14 @@ STBIDEF stbi_uc *stbi_load_from_callbacks(stbi_io_callbacks const *clbk, void *u
|
|
return stbi__load_and_postprocess_8bit(&s,x,y,comp,req_comp);
|
|
return stbi__load_and_postprocess_8bit(&s,x,y,comp,req_comp);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#if 0 /* not used in SDL */
|
|
STBIDEF stbi_uc *stbi_load_from_memory_with_palette(stbi_uc const *buffer, int len, int *x, int *y, unsigned int *palette_buffer, int palette_buffer_len)
|
|
STBIDEF stbi_uc *stbi_load_from_memory_with_palette(stbi_uc const *buffer, int len, int *x, int *y, unsigned int *palette_buffer, int palette_buffer_len)
|
|
{
|
|
{
|
|
stbi__context s;
|
|
stbi__context s;
|
|
stbi__start_mem(&s, buffer, len);
|
|
stbi__start_mem(&s, buffer, len);
|
|
return stbi__load_indexed(&s, x, y, palette_buffer, palette_buffer_len);
|
|
return stbi__load_indexed(&s, x, y, palette_buffer, palette_buffer_len);
|
|
}
|
|
}
|
|
|
|
+#endif
|
|
|
|
|
|
STBIDEF stbi_uc *stbi_load_from_callbacks_with_palette(stbi_io_callbacks const *clbk, void *user, int *x, int *y, unsigned int *palette_buffer, int palette_buffer_len)
|
|
STBIDEF stbi_uc *stbi_load_from_callbacks_with_palette(stbi_io_callbacks const *clbk, void *user, int *x, int *y, unsigned int *palette_buffer, int palette_buffer_len)
|
|
{
|
|
{
|
|
@@ -1589,7 +1590,6 @@ STBIDEF stbi_uc *stbi_load_from_callbacks_with_palette(stbi_io_callbacks const *
|
|
stbi__start_callbacks(&s, (stbi_io_callbacks *)clbk, user);
|
|
stbi__start_callbacks(&s, (stbi_io_callbacks *)clbk, user);
|
|
return stbi__load_indexed(&s, x, y, palette_buffer, palette_buffer_len);
|
|
return stbi__load_indexed(&s, x, y, palette_buffer, palette_buffer_len);
|
|
}
|
|
}
|
|
-#endif
|
|
|
|
|
|
|
|
#ifndef STBI_NO_GIF
|
|
#ifndef STBI_NO_GIF
|
|
STBIDEF stbi_uc *stbi_load_gif_from_memory(stbi_uc const *buffer, int len, int **delays, int *x, int *y, int *z, int *comp, int req_comp)
|
|
STBIDEF stbi_uc *stbi_load_gif_from_memory(stbi_uc const *buffer, int len, int **delays, int *x, int *y, int *z, int *comp, int req_comp)
|
|
@@ -4735,6 +4735,7 @@ static int stbi__do_zlib(stbi__zbuf *a, char *obuf, int olen, int exp, int parse
|
|
return stbi__parse_zlib(a, parse_header);
|
|
return stbi__parse_zlib(a, parse_header);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#if 0 /* not used in SDL */
|
|
STBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen)
|
|
STBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen)
|
|
{
|
|
{
|
|
stbi__zbuf a;
|
|
stbi__zbuf a;
|
|
@@ -4755,6 +4756,7 @@ STBIDEF char *stbi_zlib_decode_malloc(char const *buffer, int len, int *outlen)
|
|
{
|
|
{
|
|
return stbi_zlib_decode_malloc_guesssize(buffer, len, 16384, outlen);
|
|
return stbi_zlib_decode_malloc_guesssize(buffer, len, 16384, outlen);
|
|
}
|
|
}
|
|
|
|
+#endif /* */
|
|
|
|
|
|
STBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, int len, int initial_size, int *outlen, int parse_header)
|
|
STBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, int len, int initial_size, int *outlen, int parse_header)
|
|
{
|
|
{
|
|
@@ -4772,6 +4774,7 @@ STBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, i
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#if 0 /* not used in SDL */
|
|
STBIDEF int stbi_zlib_decode_buffer(char *obuffer, int olen, char const *ibuffer, int ilen)
|
|
STBIDEF int stbi_zlib_decode_buffer(char *obuffer, int olen, char const *ibuffer, int ilen)
|
|
{
|
|
{
|
|
stbi__zbuf a;
|
|
stbi__zbuf a;
|
|
@@ -4809,6 +4812,7 @@ STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char
|
|
else
|
|
else
|
|
return -1;
|
|
return -1;
|
|
}
|
|
}
|
|
|
|
+#endif /* */
|
|
#endif
|
|
#endif
|
|
|
|
|
|
// public domain "baseline" PNG decoder v0.10 Sean Barrett 2006-11-18
|
|
// public domain "baseline" PNG decoder v0.10 Sean Barrett 2006-11-18
|