fromValue static method

ImageFormat fromValue(
  1. int value
)

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

Implementation

static ImageFormat fromValue(int value) {
    	switch (value) {
      	case 0:
        	return ImageFormat.bmp;
      	case 2:
        	return ImageFormat.jpeg;
      	case 13:
        	return ImageFormat.png;
      	case 18:
        	return ImageFormat.tiff;
      	case 30:
        	return ImageFormat.jpeg2000;
      	case 31:
        	return ImageFormat.webp;
      	case 34:
        	return ImageFormat.raw;
    default:
        	throw Exception("Unable to find the specified enum value for $value");
    	}
  	}