const char * ClearOrientation(void)
{
    int a;
    if (NumOrientations == 0) return NULL;

    for (a=0;a<NumOrientations;a++){
        switch(OrientationNumFormat[a]){
            case FMT_SBYTE:
            case FMT_BYTE:      
                *(uchar *)(OrientationPtr[a]) = 1;
                break;

            case FMT_USHORT:    
                Put16u(OrientationPtr[a], 1);                
                break;

            case FMT_ULONG:     
            case FMT_SLONG:     
                memset(OrientationPtr[a], 0, 4);
                // Can't be bothered to write  generic Put32 if I only use it once.
                if (MotorolaOrder){
                    ((uchar *)OrientationPtr[a])[3] = 1;
                }else{
                    ((uchar *)OrientationPtr[a])[0] = 1;
                }
                break;

            default:
                return NULL;
        }
    }

    if (ImageInfo.Orientation >= 1 && ImageInfo.Orientation <= 8){
        return OrientTab[ImageInfo.Orientation];
    }else{
        return "";
    }
}
const char * ClearOrientation(void)
{
    int a;
    if (NumOrientations == 0) return NULL;

    for (a=0;a<NumOrientations;a++){
        switch(OrientationNumFormat[a]){
            case FMT_SBYTE:
            case FMT_BYTE:      
                *(uchar *)(OrientationPtr[a]) = 1;
                break;

            case FMT_USHORT:    
                Put16u(OrientationPtr[a], 1);                
                break;

            case FMT_ULONG:     
            case FMT_SLONG:     
                memset(OrientationPtr[a], 0, 4);
                 
                if (MotorolaOrder){
                    ((uchar *)OrientationPtr[a])[3] = 1;
                }else{
                    ((uchar *)OrientationPtr[a])[0] = 1;
                }
                break;

            default:
                return NULL;
        }
    }

    if (ImageInfo.Orientation >= 1 && ImageInfo.Orientation <= 8){
        return OrientTab[ImageInfo.Orientation];
    }else{
        return "";
    }
}