69#ifndef STBI_INCLUDE_STB_IMAGE_H
70#define STBI_INCLUDE_STB_IMAGE_H
194 #if defined(_MSC_VER) && _MSC_VER >= 0x1400
195 #define _CRT_SECURE_NO_WARNINGS
201#define STBI_VERSION 1
212typedef unsigned char stbi_uc;
227extern stbi_uc* stbi_load_from_memory(stbi_uc
const* buffer,
235extern stbi_uc* stbi_load(
char const* filename,
240extern stbi_uc* stbi_load_from_file(FILE* f,
250 int (*read)(
void* user,
254 void (*skip)(
void* user,
unsigned n);
255 int (*eof)(
void* user);
258extern stbi_uc* stbi_load_from_callbacks(stbi_io_callbacks
const* clbk,
266extern float* stbi_loadf_from_memory(stbi_uc
const* buffer,
273 #ifndef STBI_NO_STDIO
274extern float* stbi_loadf(
char const* filename,
279extern float* stbi_loadf_from_file(FILE* f,
286extern float* stbi_loadf_from_callbacks(stbi_io_callbacks
const* clbk,
293extern void stbi_hdr_to_ldr_gamma(
float gamma);
294extern void stbi_hdr_to_ldr_scale(
float scale);
296extern void stbi_ldr_to_hdr_gamma(
float gamma);
297extern void stbi_ldr_to_hdr_scale(
float scale);
301extern int stbi_is_hdr_from_callbacks(stbi_io_callbacks
const* clbk,
303extern int stbi_is_hdr_from_memory(stbi_uc
const* buffer,
int len);
305extern int stbi_is_hdr(
char const* filename);
306extern int stbi_is_hdr_from_file(FILE* f);
311extern const char* stbi_failure_reason(
void);
314extern void stbi_image_free(
void* retval_from_stbi_load);
317extern int stbi_info_from_memory(stbi_uc
const* buffer,
322extern int stbi_info_from_callbacks(stbi_io_callbacks
const* clbk,
329extern int stbi_info(
char const* filename,
int* x,
int* y,
int* comp);
330extern int stbi_info_from_file(FILE* f,
int* x,
int* y,
int* comp);
337extern void stbi_set_unpremultiply_on_load(
338 int flag_true_if_should_unpremultiply);
342extern void stbi_convert_iphone_png_to_rgb(
int flag_true_if_should_convert);
346extern char* stbi_zlib_decode_malloc_guesssize(
const char* buffer,
350extern char* stbi_zlib_decode_malloc(
const char* buffer,
int len,
int* outlen);
351extern int stbi_zlib_decode_buffer(
char* obuffer,
356extern char* stbi_zlib_decode_noheader_malloc(
const char* buffer,
359extern int stbi_zlib_decode_noheader_buffer(
char* obuffer,
366typedef void (*stbi_idct_8x8)(stbi_uc* out,
369 unsigned short* dequantize);
374typedef void (*stbi_YCbCr_to_RGB_run)(stbi_uc* output,
387extern void stbi_install_idct(stbi_idct_8x8 func);
388extern void stbi_install_YCbCr_to_RGB(stbi_YCbCr_to_RGB_run func);