# fromValue static method

PortraitInstruction fromValue(

1. int value

)

Creates an enumeration value from int. param value The int value. return The created PortraitInstruction.

## Implementation

    static PortraitInstruction fromValue(int value) {
        	switch (value) {
          	case 0:
            	return PortraitInstruction.none;
          	case 1:
            	return PortraitInstruction.centerFace;
          	case 2:
            	return PortraitInstruction.lookStraight;
          	case 3:
            	return PortraitInstruction.lookAway;
          	case 4:
            	return PortraitInstruction.adjustLightning;
          	case 5:
            	return PortraitInstruction.lowContrast;
          	case 6:
            	return PortraitInstruction.unbalancedColors;
          	case 7:
            	return PortraitInstruction.imageOutOfFocus;
          	case 8:
            	return PortraitInstruction.moveCloser;
          	case 9:
            	return PortraitInstruction.moveBack;
          	case 10:
            	return PortraitInstruction.moveDown;
          	case 11:
            	return PortraitInstruction.moveUp;
          	case 12:
            	return PortraitInstruction.moveRight;
          	case 13:
            	return PortraitInstruction.moveLeft;
          	case 14:
            	return PortraitInstruction.stayStill;
          	case 15:
            	return PortraitInstruction.closeMouth;
          	case 16:
            	return PortraitInstruction.openMouth;
          	case 17:
            	return PortraitInstruction.smile;
          	case 18:
            	return PortraitInstruction.ensureNeutralExpression;
          	case 19:
            	return PortraitInstruction.facePartiallyHidden;
          	case 20:
            	return PortraitInstruction.turnHeadLeft;
          	case 21:
            	return PortraitInstruction.turnHeadRight;
          	case 22:
            	return PortraitInstruction.raiseHead;
          	case 23:
            	return PortraitInstruction.lowerHead;
          	case 24:
            	return PortraitInstruction.rotateHead;
          	case 25:
            	return PortraitInstruction.turnHeadSlightly;
          	case 26:
            	return PortraitInstruction.removeHeadCoverings;
          	case 27:
            	return PortraitInstruction.removeFaceMask;
          	case 28:
            	return PortraitInstruction.removeGlasses;
          	case 29:
            	return PortraitInstruction.removeSunglasses;
        default:
            	throw Exception("Unable to find the specified enum value for $value");
        	}
      	}