| 459 | |
| 460 | #if AX_USE_PNG && !AX_USE_WIC |
| 461 | void pngWriteCallback(png_structp png_ptr, png_bytep data, size_t length) |
| 462 | { |
| 463 | if (png_ptr == NULL) |
| 464 | return; |
| 465 | |
| 466 | auto fileStream = (IFileStream*)png_get_io_ptr(png_ptr); |
| 467 | |
| 468 | const auto check = fileStream->write(data, static_cast<unsigned int>(length)); |
| 469 | |
| 470 | if (check != length) |
| 471 | png_error(png_ptr, "Write Error"); |
| 472 | } |
| 473 | |
| 474 | static void pngReadCallback(png_structp png_ptr, png_bytep data, png_size_t length) |
| 475 | { |
nothing calls this directly
no test coverage detected