| 58 | } |
| 59 | |
| 60 | static 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 | |
| 69 | static CImageInfo::EImageFormat ImageFormatFromChannelCount(int ColorChannelCount) |
| 70 | { |