MCPcopy Create free account
hub / github.com/DentonW/DevIL / iLoadIconPNG

Function iLoadIconPNG

DevIL/src-IL/src/il_icon.cpp:403–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

401#endif
402
403ILboolean 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
425static void ico_png_read(png_structp png_ptr, png_bytep data, png_size_t length)

Callers 1

iLoadIconInternalFunction · 0.85

Calls 3

ico_readpng_initFunction · 0.85
ico_readpng_get_imageFunction · 0.85
ico_readpng_cleanupFunction · 0.85

Tested by

no test coverage detected