Attempts to load an image from a memory buffer. The file format is specified by the user. ! \param Type Format of this file. Acceptable values are IL_BLP, IL_BMP, IL_CUT, IL_DCX, IL_DDS, IL_DICOM, IL_DOOM, IL_DOOM_FLAT, IL_DPX, IL_EXR, IL_FITS, IL_FTX, IL_GIF, IL_HDR, IL_ICO, IL_ICNS, IL_IFF, IL_IWI, IL_JP2, IL_JPG, IL_LIF, IL_MDL, IL_MNG, IL_MP3, IL_PCD, IL_PCX, IL_PIX, IL_PNG, IL_PNM, IL_PS
| 1541 | \param Size Size of the buffer |
| 1542 | \return Boolean value of failure or success. Returns IL_FALSE if loading fails.*/ |
| 1543 | ILboolean ILAPIENTRY ilLoadL(ILenum Type, const void *Lump, ILuint Size) |
| 1544 | { |
| 1545 | if (Lump == NULL || Size == 0) { |
| 1546 | ilSetError(IL_INVALID_PARAM); |
| 1547 | return IL_FALSE; |
| 1548 | } |
| 1549 | |
| 1550 | if (Type == IL_TYPE_UNKNOWN) |
| 1551 | Type = ilDetermineTypeL(Lump, Size); |
| 1552 | |
| 1553 | switch (Type) |
| 1554 | { |
| 1555 | case IL_TYPE_UNKNOWN: |
| 1556 | return IL_FALSE; |
| 1557 | |
| 1558 | #ifndef IL_NO_TGA |
| 1559 | case IL_TGA: |
| 1560 | return ilLoadTargaL(Lump, Size); |
| 1561 | #endif |
| 1562 | |
| 1563 | #ifndef IL_NO_JPG |
| 1564 | case IL_JPG: |
| 1565 | return ilLoadJpegL(Lump, Size); |
| 1566 | #endif |
| 1567 | |
| 1568 | #ifndef IL_NO_JP2 |
| 1569 | case IL_JP2: |
| 1570 | return ilLoadJp2L(Lump, Size); |
| 1571 | #endif |
| 1572 | |
| 1573 | #ifndef IL_NO_DDS |
| 1574 | case IL_DDS: |
| 1575 | return ilLoadDdsL(Lump, Size); |
| 1576 | #endif |
| 1577 | |
| 1578 | #ifndef IL_NO_PNG |
| 1579 | case IL_PNG: |
| 1580 | return ilLoadPngL(Lump, Size); |
| 1581 | #endif |
| 1582 | |
| 1583 | #ifndef IL_NO_BLP |
| 1584 | case IL_BLP: |
| 1585 | return ilLoadBlpL(Lump, Size); |
| 1586 | #endif |
| 1587 | |
| 1588 | #ifndef IL_NO_BMP |
| 1589 | case IL_BMP: |
| 1590 | return ilLoadBmpL(Lump, Size); |
| 1591 | #endif |
| 1592 | |
| 1593 | #ifndef IL_NO_CUT |
| 1594 | case IL_CUT: |
| 1595 | return ilLoadCutL(Lump, Size); |
| 1596 | #endif |
| 1597 | |
| 1598 | #ifndef IL_NO_DICOM |
| 1599 | case IL_DICOM: |
| 1600 | return ilLoadDicomL(Lump, Size); |
nothing calls this directly
no test coverage detected