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

Function ilSavePsd

DevIL/src-IL/src/il_psd.cpp:904–928  ·  view source on GitHub ↗

Writes a Psd file

Source from the content-addressed store, hash-verified

902
903//! Writes a Psd file
904ILboolean ilSavePsd(const ILstring FileName)
905{
906 ILHANDLE PsdFile;
907 ILuint PsdSize;
908
909 if (ilGetBoolean(IL_FILE_MODE) == IL_FALSE) {
910 if (iFileExists(FileName)) {
911 ilSetError(IL_FILE_ALREADY_EXISTS);
912 return IL_FALSE;
913 }
914 }
915
916 PsdFile = iopenw(FileName);
917 if (PsdFile == NULL) {
918 ilSetError(IL_COULD_NOT_OPEN_FILE);
919 return IL_FALSE;
920 }
921
922 PsdSize = ilSavePsdF(PsdFile);
923 iclosew(PsdFile);
924
925 if (PsdSize == 0)
926 return IL_FALSE;
927 return IL_TRUE;
928}
929
930
931//! Writes a Psd to an already-opened file

Callers 2

ILAPIENTRY ilSaveFunction · 0.85
ILAPIENTRY ilSaveImageFunction · 0.85

Calls 3

iFileExistsFunction · 0.85
ilSetErrorFunction · 0.85
ilSavePsdFFunction · 0.85

Tested by

no test coverage detected