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

Function png_reader_callback

dlib/image_loader/png_loader.cpp:35–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33 }
34
35 void png_reader_callback(png_structp png, png_bytep data, png_size_t length)
36 {
37 using callback_t = std::function<std::size_t(char*,std::size_t)>;
38 callback_t* clb = static_cast<callback_t*>(png_get_io_ptr(png));
39 const auto ret = (*clb)((char*)data, length);
40 if (ret != length)
41 png_error(png, "png_loader: read error in png_reader_callback");
42 }
43
44// ----------------------------------------------------------------------------------------
45

Callers

nothing calls this directly

Calls 1

png_get_io_ptrFunction · 0.85

Tested by

no test coverage detected