Lines Matching defs:buffer
248 // through a small internal buffer (currently 128 bytes) to try to reduce
406 // load image by filename, open file, or memory buffer
421 STBIDEF stbi_uc *stbi_load_from_memory (stbi_uc const *buffer, int len , int *x, int *y, int *channels_in_file, int desired_channels);
431 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);
435 STBIDEF int stbi_convert_wchar_to_utf8(char *buffer, size_t bufferlen, const wchar_t* input);
443 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);
456 STBIDEF float *stbi_loadf_from_memory (stbi_uc const *buffer, int len, int *x, int *y, int *channels_in_file, int desired_channels);
477 STBIDEF int stbi_is_hdr_from_memory(stbi_uc const *buffer, int len);
492 STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp);
494 STBIDEF int stbi_is_16_bit_from_memory(stbi_uc const *buffer, int len);
527 STBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen);
528 STBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, int len, int initial_size, int *outlen, int parse_header);
529 STBIDEF char *stbi_zlib_decode_malloc(const char *buffer, int len, int *outlen);
532 STBIDEF char *stbi_zlib_decode_noheader_malloc(const char *buffer, int len, int *outlen);
824 static void stbi__start_mem(stbi__context *s, stbi_uc const *buffer, int len)
829 s->img_buffer = s->img_buffer_original = (stbi_uc *) buffer;
830 s->img_buffer_end = s->img_buffer_original_end = (stbi_uc *) buffer+len;
887 // but we just rewind to the beginning of the initial buffer, because
1329 STBIDEF int stbi_convert_wchar_to_utf8(char *buffer, size_t bufferlen, const wchar_t* input)
1331 return WideCharToMultiByte(65001 /* UTF8 */, 0, input, -1, buffer, (int) bufferlen, NULL, NULL);
1381 // need to 'unget' all the characters in the IO buffer
1394 // need to 'unget' all the characters in the IO buffer
1413 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)
1416 stbi__start_mem(&s,buffer,len);
1427 STBIDEF stbi_uc *stbi_load_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp)
1430 stbi__start_mem(&s,buffer,len);
1442 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)
1446 stbi__start_mem(&s,buffer,len);
1476 STBIDEF float *stbi_loadf_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp)
1479 stbi__start_mem(&s,buffer,len);
1515 STBIDEF int stbi_is_hdr_from_memory(stbi_uc const *buffer, int len)
1519 stbi__start_mem(&s,buffer,len);
1522 STBI_NOTUSED(buffer);
1630 // if feof() is true, check if buffer = end
1664 static int stbi__getn(stbi__context *s, stbi_uc *buffer, int n)
1671 memcpy(buffer, s->img_buffer, blen);
1673 count = (s->io.read)(s->io_user_data, (char*) buffer + blen, n - blen);
1681 memcpy(buffer, s->img_buffer, n);
1741 // assume data buffer is malloced, so malloc a new one and free that one
1977 stbi__uint32 code_buffer; // jpeg entropy-coded buffer
1979 unsigned char marker; // marker seen while filling entropy buffer
3900 // allocate line buffer big enough for upsampling off the edges
4081 // - all input must be provided in an upfront buffer
4082 // - all output is written to a single output buffer (can malloc/realloc)
4173 // memory buffer
4264 if (!z->z_expandable) return stbi__err("output buffer limit","Corrupt PNG");
4408 if (a->zbuffer + len > a->zbuffer_end) return stbi__err("read past buffer","Corrupt PNG");
4427 // window = 1 << (8 + cinfo)... but who cares, we fully buffer output
4498 STBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen)
4503 a.zbuffer = (stbi_uc *) buffer;
4504 a.zbuffer_end = (stbi_uc *) buffer + len;
4514 STBIDEF char *stbi_zlib_decode_malloc(char const *buffer, int len, int *outlen)
4516 return stbi_zlib_decode_malloc_guesssize(buffer, len, 16384, outlen);
4519 STBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, int len, int initial_size, int *outlen, int parse_header)
4524 a.zbuffer = (stbi_uc *) buffer;
4525 a.zbuffer_end = (stbi_uc *) buffer + len;
4546 STBIDEF char *stbi_zlib_decode_noheader_malloc(char const *buffer, int len, int *outlen)
4551 a.zbuffer = (stbi_uc *) buffer;
4552 a.zbuffer_end = (stbi_uc *) buffer+len;
4781 // unpack 1/2/4-bit into a 8-bit buffer. allows us to keep the common 8-bit path optimal at minimal cost for 1/2/4-bit
6523 // intermediate buffer is RGBA
6562 stbi_uc *out; // output buffer (always 4 components)
7037 // free temp buffer;
7071 // if there was an error and we allocated an image buffer, free it!
7114 static char *stbi__hdr_gettoken(stbi__context *z, char *buffer)
7122 buffer[len++] = c;
7132 buffer[len] = 0;
7133 return buffer;
7165 char buffer[STBI__HDR_BUFLEN];
7178 headerToken = stbi__hdr_gettoken(s,buffer);
7184 token = stbi__hdr_gettoken(s,buffer);
7193 token = stbi__hdr_gettoken(s,buffer);
7296 char buffer[STBI__HDR_BUFLEN];
7311 token = stbi__hdr_gettoken(s,buffer);
7320 token = stbi__hdr_gettoken(s,buffer);
7739 STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp)
7742 stbi__start_mem(&s,buffer,len);
7753 STBIDEF int stbi_is_16_bit_from_memory(stbi_uc const *buffer, int len)
7756 stbi__start_mem(&s,buffer,len);