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

Function ilSaveMng

DevIL/src-IL/src/il_mng.cpp:287–311  ·  view source on GitHub ↗

Writes a Mng file

Source from the content-addressed store, hash-verified

285
286//! Writes a Mng file
287ILboolean ilSaveMng(const ILstring FileName)
288{
289 ILHANDLE MngFile;
290 ILuint MngSize;
291
292 if (ilGetBoolean(IL_FILE_MODE) == IL_FALSE) {
293 if (iFileExists(FileName)) {
294 ilSetError(IL_FILE_ALREADY_EXISTS);
295 return IL_FALSE;
296 }
297 }
298
299 MngFile = iopenw(FileName);
300 if (MngFile == NULL) {
301 ilSetError(IL_COULD_NOT_OPEN_FILE);
302 return IL_FALSE;
303 }
304
305 MngSize = ilSaveMngF(MngFile);
306 iclosew(MngFile);
307
308 if (MngSize == 0)
309 return IL_FALSE;
310 return IL_TRUE;
311}
312
313
314//! Writes a Mng to an already-opened file

Callers 1

ILAPIENTRY ilSaveImageFunction · 0.85

Calls 3

iFileExistsFunction · 0.85
ilSetErrorFunction · 0.85
ilSaveMngFFunction · 0.85

Tested by

no test coverage detected