MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / stbi__start_mem

Function stbi__start_mem

lite/example/cpp_example/mge/cv/stb_image.h:847–853  ·  view source on GitHub ↗

initialize a memory-decode context

Source from the content-addressed store, hash-verified

845
846// initialize a memory-decode context
847static void stbi__start_mem(stbi__context* s, stbi_uc const* buffer, int len) {
848 s->io.read = NULL;
849 s->read_from_callbacks = 0;
850 s->callback_already_read = 0;
851 s->img_buffer = s->img_buffer_original = (stbi_uc*)buffer;
852 s->img_buffer_end = s->img_buffer_original_end = (stbi_uc*)buffer + len;
853}
854
855// initialize a callback-based context
856static void stbi__start_callbacks(stbi__context* s, stbi_io_callbacks* c, void* user) {

Callers 7

stbi_load_16_from_memoryFunction · 0.85
stbi_load_from_memoryFunction · 0.85
stbi_loadf_from_memoryFunction · 0.85
stbi_is_hdr_from_memoryFunction · 0.85
stbi_info_from_memoryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected