Creates a copy of Src and returns it.
| 1066 | |
| 1067 | // Creates a copy of Src and returns it. |
| 1068 | ILAPI ILimage* ILAPIENTRY ilCopyImage_(ILimage *Src) |
| 1069 | { |
| 1070 | ILimage *Dest; |
| 1071 | |
| 1072 | if (Src == NULL) { |
| 1073 | ilSetError(IL_INVALID_PARAM); |
| 1074 | return NULL; |
| 1075 | } |
| 1076 | |
| 1077 | Dest = ilNewImage(Src->Width, Src->Height, Src->Depth, Src->Bpp, Src->Bpc); |
| 1078 | if (Dest == NULL) { |
| 1079 | return NULL; |
| 1080 | } |
| 1081 | |
| 1082 | if (ilCopyImageAttr(Dest, Src) == IL_FALSE) |
| 1083 | return NULL; |
| 1084 | |
| 1085 | memcpy(Dest->Data, Src->Data, Src->SizeOfData); |
| 1086 | |
| 1087 | return Dest; |
| 1088 | } |
| 1089 | |
| 1090 | |
| 1091 | ILuint ILAPIENTRY ilCloneCurImage() |
nothing calls this directly
no test coverage detected