Merge branch 'load_16_variants' of https://github.com/poppolopoppo/stb into poppolopoppo-load_16_variants
This commit is contained in:
commit
b226e71ce6
17
stb_image.h
17
stb_image.h
@ -370,7 +370,8 @@ STBIDEF stbi_us *stbi_load_16(char const *filename, int *x, int *y, int *channel
|
|||||||
#ifndef STBI_NO_STDIO
|
#ifndef STBI_NO_STDIO
|
||||||
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
|
||||||
// @TODO the other variants
|
STBIDEF stbi_us *stbi_load_16_from_memory (stbi_uc const *buffer, int len, int *x, int *y, int *channels_in_file, int desired_channels);
|
||||||
|
STBIDEF stbi_us *stbi_load_16_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *channels_in_file, int desired_channels);
|
||||||
|
|
||||||
////////////////////////////////////
|
////////////////////////////////////
|
||||||
//
|
//
|
||||||
@ -1191,6 +1192,20 @@ STBIDEF stbi_us *stbi_load_16(char const *filename, int *x, int *y, int *comp, i
|
|||||||
|
|
||||||
#endif //!STBI_NO_STDIO
|
#endif //!STBI_NO_STDIO
|
||||||
|
|
||||||
|
STBIDEF stbi_us *stbi_load_16_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *channels_in_file, int desired_channels)
|
||||||
|
{
|
||||||
|
stbi__context s;
|
||||||
|
stbi__start_mem(&s, buffer, len);
|
||||||
|
return stbi__load_and_postprocess_16bit(&s, x, y, channels_in_file, desired_channels);
|
||||||
|
}
|
||||||
|
|
||||||
|
STBIDEF stbi_us *stbi_load_16_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *channels_in_file, int desired_channels)
|
||||||
|
{
|
||||||
|
stbi__context s;
|
||||||
|
stbi__start_callbacks(&s, (stbi_io_callbacks *)clbk, user);
|
||||||
|
return stbi__load_and_postprocess_16bit(&s, x, y, channels_in_file, desired_channels);
|
||||||
|
}
|
||||||
|
|
||||||
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_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp)
|
||||||
{
|
{
|
||||||
stbi__context s;
|
stbi__context s;
|
||||||
|
Loading…
Reference in New Issue
Block a user