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

Function ilFixCur

DevIL/src-IL/src/il_convert.cpp:986–1025  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

984
985
986ILboolean ilFixCur()
987{
988 if (ilIsEnabled(IL_ORIGIN_SET)) {
989 if ((ILenum)ilGetInteger(IL_ORIGIN_MODE) != iCurImage->Origin) {
990 if (!ilFlipImage()) {
991 return IL_FALSE;
992 }
993 }
994 }
995
996 if (ilIsEnabled(IL_TYPE_SET)) {
997 if ((ILenum)ilGetInteger(IL_TYPE_MODE) != iCurImage->Type) {
998 if (!ilConvertImage(iCurImage->Format, ilGetInteger(IL_TYPE_MODE))) {
999 return IL_FALSE;
1000 }
1001 }
1002 }
1003 if (ilIsEnabled(IL_FORMAT_SET)) {
1004 if ((ILenum)ilGetInteger(IL_FORMAT_MODE) != iCurImage->Format) {
1005 if (!ilConvertImage(ilGetInteger(IL_FORMAT_MODE), iCurImage->Type)) {
1006 return IL_FALSE;
1007 }
1008 }
1009 }
1010
1011 if (iCurImage->Format == IL_COLOUR_INDEX) {
1012 if (ilGetBoolean(IL_CONV_PAL) == IL_TRUE) {
1013 if (!ilConvertImage(IL_BGR, IL_UNSIGNED_BYTE)) {
1014 return IL_FALSE;
1015 }
1016 }
1017 }
1018/* Swap Colors on Big Endian !!!!!
1019#ifdef __BIG_ENDIAN__
1020 // Swap endian
1021 EndianSwapData(iCurImage);
1022#endif
1023*/
1024 return IL_TRUE;
1025}
1026
1027/*
1028ILboolean ilFixImage()

Callers 2

ilFixImageFunction · 0.85
ilDxtcDataToSurfaceFunction · 0.85

Calls 1

ilFlipImageFunction · 0.85

Tested by

no test coverage detected