MCPcopy Create free account
hub / github.com/DentonW/DevIL / ILAPIENTRY ilSaveData

Function ILAPIENTRY ilSaveData

DevIL/src-IL/src/il_rawdata.cpp:98–117  ·  view source on GitHub ↗

Save the current image to FileName as raw data

Source from the content-addressed store, hash-verified

96
97//! Save the current image to FileName as raw data
98ILboolean ILAPIENTRY ilSaveData(ILconst_string FileName)
99{
100 ILHANDLE DataFile;
101
102 if (iCurImage == NULL) {
103 ilSetError(IL_ILLEGAL_OPERATION);
104 return IL_FALSE;
105 }
106
107 DataFile = iopenr(FileName);
108 if (DataFile == NULL) {
109 ilSetError(IL_COULD_NOT_OPEN_FILE);
110 return IL_FALSE;
111 }
112
113 iwrite(iCurImage->Data, 1, iCurImage->SizeOfData);
114 icloser(DataFile);
115
116 return IL_TRUE;
117}
118
119
120//#endif//IL_NO_DATA

Callers

nothing calls this directly

Calls 1

ilSetErrorFunction · 0.85

Tested by

no test coverage detected