|
|
|
@ -238,10 +238,10 @@ publish, and distribute this file as you see fit. |
|
|
|
|
// stbi_image_free(data)
|
|
|
|
|
//
|
|
|
|
|
// Standard parameters:
|
|
|
|
|
// int *x -- outputs image width in pixels
|
|
|
|
|
// int *y -- outputs image height in pixels
|
|
|
|
|
// int *comp -- outputs # of image components in image file
|
|
|
|
|
// int req_comp -- if non-zero, # of image components requested in result
|
|
|
|
|
// int *x -- outputs image width in pixels
|
|
|
|
|
// int *y -- outputs image height in pixels
|
|
|
|
|
// int *channels_in_file -- outputs # of image components in image file
|
|
|
|
|
// int desired_channels -- if non-zero, # of image components requested in result
|
|
|
|
|
//
|
|
|
|
|
// The return value from an image loader is an 'unsigned char *' which points
|
|
|
|
|
// to the pixel data, or NULL on an allocation failure or if the image is
|
|
|
|
@ -406,6 +406,7 @@ enum |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
typedef unsigned char stbi_uc; |
|
|
|
|
typedef unsigned short stbi_us; |
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus |
|
|
|
|
extern "C" { |
|
|
|
@ -433,22 +434,24 @@ typedef struct |
|
|
|
|
int (*eof) (void *user); // returns nonzero if we are at end of file/data
|
|
|
|
|
} stbi_io_callbacks; |
|
|
|
|
|
|
|
|
|
STBIDEF stbi_uc *stbi_load (char const *filename, int *x, int *y, int *comp, int req_comp); |
|
|
|
|
STBIDEF stbi_uc *stbi_load_from_memory (stbi_uc const *buffer, int len , 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); |
|
|
|
|
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_memory (stbi_uc const *buffer, int len , int *x, int *y, int *channels_in_file, int desired_channels); |
|
|
|
|
STBIDEF stbi_uc *stbi_load_from_callbacks(stbi_io_callbacks const *clbk , void *user, int *x, int *y, int *channels_in_file, int desired_channels); |
|
|
|
|
|
|
|
|
|
#ifndef STBI_NO_STDIO |
|
|
|
|
STBIDEF stbi_uc *stbi_load_from_file (FILE *f, int *x, int *y, int *comp, int req_comp); |
|
|
|
|
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
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
//STBIDEF stbi_us *stbi_load_16(char const *filename, int *x, int *y, int *channels_in_file, int desired_channels);
|
|
|
|
|
|
|
|
|
|
#ifndef STBI_NO_LINEAR |
|
|
|
|
STBIDEF float *stbi_loadf (char const *filename, int *x, int *y, int *comp, int req_comp); |
|
|
|
|
STBIDEF float *stbi_loadf_from_memory (stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp); |
|
|
|
|
STBIDEF float *stbi_loadf_from_callbacks (stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp); |
|
|
|
|
STBIDEF float *stbi_loadf (char const *filename, 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); |
|
|
|
|
|
|
|
|
|
#ifndef STBI_NO_STDIO |
|
|
|
|
STBIDEF float *stbi_loadf_from_file (FILE *f, int *x, int *y, int *comp, int req_comp); |
|
|
|
|
STBIDEF float *stbi_loadf_from_file (FILE *f, int *x, int *y, int *channels_in_file, int desired_channels); |
|
|
|
|
#endif |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|