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

Function ilSaveRaw

DevIL/src-IL/src/il_raw.cpp:118–142  ·  view source on GitHub ↗

Writes a Raw file

Source from the content-addressed store, hash-verified

116
117//! Writes a Raw file
118ILboolean ilSaveRaw(const ILstring FileName)
119{
120 ILHANDLE RawFile;
121 ILuint RawSize;
122
123 if (ilGetBoolean(IL_FILE_MODE) == IL_FALSE) {
124 if (iFileExists(FileName)) {
125 ilSetError(IL_FILE_ALREADY_EXISTS);
126 return IL_FALSE;
127 }
128 }
129
130 RawFile = iopenw(FileName);
131 if (RawFile == NULL) {
132 ilSetError(IL_COULD_NOT_OPEN_FILE);
133 return IL_FALSE;
134 }
135
136 RawSize = ilSaveRawF(RawFile);
137 iclosew(RawFile);
138
139 if (RawSize == 0)
140 return IL_FALSE;
141 return IL_TRUE;
142}
143
144
145//! Writes Raw to an already-opened file

Callers 2

ILAPIENTRY ilSaveFunction · 0.85
ILAPIENTRY ilSaveImageFunction · 0.85

Calls 3

iFileExistsFunction · 0.85
ilSetErrorFunction · 0.85
ilSaveRawFFunction · 0.85

Tested by

no test coverage detected