| 401 | #endif |
| 402 | |
| 403 | ILboolean iLoadIconPNG(ICOIMAGE *Icon) |
| 404 | { |
| 405 | #ifndef IL_NO_PNG |
| 406 | ILint init; |
| 407 | init = ico_readpng_init(); |
| 408 | if (init) |
| 409 | return IL_FALSE; |
| 410 | if (!ico_readpng_get_image(Icon, GAMMA_CORRECTION)) |
| 411 | return IL_FALSE; |
| 412 | |
| 413 | ico_readpng_cleanup(); |
| 414 | Icon->Head.Size = 0; // Easiest way to tell that this is a PNG. |
| 415 | // In the normal routine, it will not be 0. |
| 416 | |
| 417 | return IL_TRUE; |
| 418 | #else |
| 419 | Icon; |
| 420 | return IL_FALSE; |
| 421 | #endif |
| 422 | } |
| 423 | |
| 424 | #ifndef IL_NO_PNG |
| 425 | static void ico_png_read(png_structp png_ptr, png_bytep data, png_size_t length) |
no test coverage detected