Attempts to save an image to a memory buffer. The file format is specified by the user. ! \param Type Format of this image file. Acceptable values are IL_BMP, IL_CHEAD, IL_DDS, IL_EXR, IL_HDR, IL_JP2, IL_JPG, IL_PCX, IL_PNG, IL_PNM, IL_PSD, IL_RAW, IL_SGI, IL_TGA, IL_TIF, IL_VTF, IL_WBMP and IL_JASC_PAL. \param Lump Memory buffer to save to \param Size Size of the memory buffer \return Bool
| 2425 | \param Size Size of the memory buffer |
| 2426 | \return Boolean value of failure or success. Returns IL_FALSE if saving failed.*/ |
| 2427 | ILuint ILAPIENTRY ilSaveL(ILenum Type, void *Lump, ILuint Size) |
| 2428 | { |
| 2429 | if (Lump == NULL) { |
| 2430 | if (Size != 0) { |
| 2431 | ilSetError(IL_INVALID_PARAM); |
| 2432 | return 0; |
| 2433 | } |
| 2434 | // The user wants to know how large of a buffer they need. |
| 2435 | else { |
| 2436 | return ilDetermineSize(Type); |
| 2437 | } |
| 2438 | } |
| 2439 | |
| 2440 | switch (Type) |
| 2441 | { |
| 2442 | #ifndef IL_NO_BMP |
| 2443 | case IL_BMP: |
| 2444 | return ilSaveBmpL(Lump, Size); |
| 2445 | #endif |
| 2446 | |
| 2447 | #ifndef IL_NO_EXR |
| 2448 | case IL_EXR: |
| 2449 | return ilSaveExrL(Lump, Size); |
| 2450 | #endif |
| 2451 | |
| 2452 | #ifndef IL_NO_HDR |
| 2453 | case IL_HDR: |
| 2454 | return ilSaveHdrL(Lump, Size); |
| 2455 | #endif |
| 2456 | |
| 2457 | #ifndef IL_NO_JP2 |
| 2458 | case IL_JP2: |
| 2459 | return ilSaveJp2L(Lump, Size); |
| 2460 | #endif |
| 2461 | |
| 2462 | #ifndef IL_NO_JPG |
| 2463 | case IL_JPG: |
| 2464 | return ilSaveJpegL(Lump, Size); |
| 2465 | #endif |
| 2466 | |
| 2467 | #ifndef IL_NO_PNG |
| 2468 | case IL_PNG: |
| 2469 | return ilSavePngL(Lump, Size); |
| 2470 | #endif |
| 2471 | |
| 2472 | #ifndef IL_NO_PNM |
| 2473 | case IL_PNM: |
| 2474 | return ilSavePnmL(Lump, Size); |
| 2475 | #endif |
| 2476 | |
| 2477 | #ifndef IL_NO_PSD |
| 2478 | case IL_PSD: |
| 2479 | return ilSavePsdL(Lump, Size); |
| 2480 | #endif |
| 2481 | |
| 2482 | #ifndef IL_NO_RAW |
| 2483 | case IL_RAW: |
| 2484 | return ilSaveRawL(Lump, Size); |
nothing calls this directly
no test coverage detected