MCPcopy Create free account
hub / github.com/ddnet/ddnet / PngReadDataCallback

Function PngReadDataCallback

src/engine/gfx/image_loader.cpp:60–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60static void PngReadDataCallback(png_structp pPngStruct, png_bytep pOutBytes, png_size_t ByteCountToRead)
61{
62 CByteBufferReader *pReader = static_cast<CByteBufferReader *>(png_get_io_ptr(pPngStruct));
63 if(!pReader->Read(pOutBytes, ByteCountToRead))
64 {
65 png_error(pPngStruct, "Could not read all bytes, file was too small");
66 }
67}
68
69static CImageInfo::EImageFormat ImageFormatFromChannelCount(int ColorChannelCount)
70{

Callers

nothing calls this directly

Calls 1

ReadMethod · 0.45

Tested by

no test coverage detected