MCPcopy Create free account
hub / github.com/davisking/dlib / png_loader

Method png_loader

dlib/image_loader/png_loader.cpp:125–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123// ----------------------------------------------------------------------------------------
124
125 png_loader::png_loader(const unsigned char* image_buffer, std::size_t buffer_size)
126 {
127 std::size_t counter{0};
128 load([&](char* data, std::size_t ndata) {
129 ndata = std::min(ndata, buffer_size - counter);
130 std::memcpy(data, image_buffer + counter, ndata);
131 counter += ndata;
132 return ndata;
133 });
134 }
135
136// ----------------------------------------------------------------------------------------
137

Callers

nothing calls this directly

Calls 3

loadFunction · 0.50
minFunction · 0.50
memcpyFunction · 0.50

Tested by

no test coverage detected