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

Function iRegisterSave

DevIL/src-IL/src/il_register.cpp:202–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200
201
202ILboolean iRegisterSave(ILconst_string FileName)
203{
204 iFormatS *TempNode = SaveProcs;
205 ILstring Ext = iGetExtension(FileName);
206 ILenum Error;
207
208 if (!Ext)
209 return IL_FALSE;
210
211 while (TempNode != NULL) {
212 if (!iStrCmp(Ext, TempNode->Ext)) {
213 Error = TempNode->Save(FileName);
214 if (Error == IL_NO_ERROR || Error == 0) { // 0 and IL_NO_ERROR are both valid.
215 return IL_TRUE;
216 }
217 else {
218 ilSetError(Error);
219 return IL_FALSE;
220 }
221 }
222 TempNode = TempNode->Next;
223 }
224
225 return IL_FALSE;
226}
227
228
229//

Callers 1

ILAPIENTRY ilSaveImageFunction · 0.85

Calls 4

iGetExtensionFunction · 0.85
iStrCmpFunction · 0.85
ilSetErrorFunction · 0.85
SaveMethod · 0.45

Tested by

no test coverage detected