Attempts to save an image to a file. The file format is specified by the user. ! \param Type Format of this 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 FileName Ansi or Unicode string, depending on the compiled version of DevIL, that gives t
| 2191 | the filename to save to. |
| 2192 | \return Boolean value of failure or success. Returns IL_FALSE if saving failed.*/ |
| 2193 | ILboolean ILAPIENTRY ilSave(ILenum Type, ILconst_string FileName) |
| 2194 | { |
| 2195 | switch (Type) |
| 2196 | { |
| 2197 | case IL_TYPE_UNKNOWN: |
| 2198 | return ilSaveImage(FileName); |
| 2199 | |
| 2200 | #ifndef IL_NO_BMP |
| 2201 | case IL_BMP: |
| 2202 | return ilSaveBmp(FileName); |
| 2203 | #endif |
| 2204 | |
| 2205 | #ifndef IL_NO_CHEAD |
| 2206 | case IL_CHEAD: |
| 2207 | return ilSaveCHeader(FileName, (char*)"IL_IMAGE"); |
| 2208 | #endif |
| 2209 | |
| 2210 | #ifndef IL_NO_DDS |
| 2211 | case IL_DDS: |
| 2212 | return ilSaveDds(FileName); |
| 2213 | #endif |
| 2214 | |
| 2215 | #ifndef IL_NO_EXR |
| 2216 | case IL_EXR: |
| 2217 | return ilSaveExr(FileName); |
| 2218 | #endif |
| 2219 | |
| 2220 | #ifndef IL_NO_HDR |
| 2221 | case IL_HDR: |
| 2222 | return ilSaveHdr(FileName); |
| 2223 | #endif |
| 2224 | |
| 2225 | #ifndef IL_NO_JP2 |
| 2226 | case IL_JP2: |
| 2227 | return ilSaveJp2(FileName); |
| 2228 | #endif |
| 2229 | |
| 2230 | #ifndef IL_NO_JPG |
| 2231 | case IL_JPG: |
| 2232 | return ilSaveJpeg(FileName); |
| 2233 | #endif |
| 2234 | |
| 2235 | /*#ifndef IL_NO_KTX |
| 2236 | case IL_KTX: |
| 2237 | return ilSaveKtx(FileName); |
| 2238 | #endif*/ |
| 2239 | |
| 2240 | #ifndef IL_NO_PCX |
| 2241 | case IL_PCX: |
| 2242 | return ilSavePcx(FileName); |
| 2243 | #endif |
| 2244 | |
| 2245 | #ifndef IL_NO_PNG |
| 2246 | case IL_PNG: |
| 2247 | return ilSavePng(FileName); |
| 2248 | #endif |
| 2249 | |
| 2250 | #ifndef IL_NO_PNM |
nothing calls this directly
no test coverage detected