Changed the ImageFormat enum to be an enum class.