Writes a Psd file
| 902 | |
| 903 | //! Writes a Psd file |
| 904 | ILboolean 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 |
no test coverage detected