def _set_image_effect_params(self, value):
    self._check_camera_open()
    to_int = (lambda x: int(x))
    to_byte = (lambda x: max(0, min(255, int(x))))
    to_bool = (lambda x: (0, 1)[bool(x)])
    to_8dot8 = (lambda x: int((x * 256)))
    valid_transforms = {'solarize': [(to_bool, to_byte, to_byte, to_byte, to_byte), (to_byte, to_byte, to_byte, to_byte), (to_bool,)], 'colorpoint': [((lambda x: max(0, min(3, int(x)))),)], 'colorbalance': [(to_8dot8, to_8dot8, to_8dot8, to_8dot8, to_int, to_int), (to_8dot8, to_8dot8, to_8dot8, to_8dot8), (to_8dot8, to_8dot8, to_8dot8)], 'colorswap': [(to_bool,)], 'posterise': [((lambda x: max(2, min(31, int(x)))),)], 'blur': [((lambda x: max(1, min(2, int(x)))),)], 'film': [(to_byte, to_byte, to_byte)], 'watercolor': [(), (to_byte, to_byte)]}
    try:
        params = tuple((i for i in value))
    except TypeError:
        params = (value,)
    effect = self.image_effect
    param_transforms = [transforms for transforms in valid_transforms.get(effect, []) if (len(transforms) == len(params))]
    if (not param_transforms):
        raise PiCameraValueError(('invalid set of parameters for effect "%s"' % effect))
    param_transforms = param_transforms[0]
    params = tuple((transform(p) for (transform, p) in zip(param_transforms, params)))
    mp = mmal.MMAL_PARAMETER_IMAGEFX_PARAMETERS_T(mmal.MMAL_PARAMETER_HEADER_T(mmal.MMAL_PARAMETER_IMAGE_EFFECT_PARAMETERS, ct.sizeof(mmal.MMAL_PARAMETER_IMAGEFX_PARAMETERS_T)), effect=self.IMAGE_EFFECTS[effect], num_effect_params=len(params), effect_parameter=params)
    self._camera.control.params[mmal.MMAL_PARAMETER_IMAGE_EFFECT_PARAMETERS] = mp
    self._image_effect_params = value
def _set_image_effect_params(self, value):
    self._check_camera_open()
    to_int = (lambda x: int(x))
    to_byte = (lambda x: max(0, min(255, int(x))))
    to_bool = (lambda x: (0, 1)[bool(x)])
    to_8dot8 = (lambda x: int((x * 256)))
    valid_transforms = {'solarize': [(to_bool, to_byte, to_byte, to_byte, to_byte), (to_byte, to_byte, to_byte, to_byte), (to_bool,)], 'colorpoint': [((lambda x: max(0, min(3, int(x)))),)], 'colorbalance': [(to_8dot8, to_8dot8, to_8dot8, to_8dot8, to_int, to_int), (to_8dot8, to_8dot8, to_8dot8, to_8dot8), (to_8dot8, to_8dot8, to_8dot8)], 'colorswap': [(to_bool,)], 'posterise': [((lambda x: max(2, min(31, int(x)))),)], 'blur': [((lambda x: max(1, min(2, int(x)))),)], 'film': [(to_byte, to_byte, to_byte)], 'watercolor': [(), (to_byte, to_byte)]}
    try:
        params = tuple((i for i in value))
    except TypeError:
        params = (value,)
    effect = self.image_effect
    param_transforms = [transforms for transforms in valid_transforms.get(effect, []) if (len(transforms) == len(params))]
    if (not param_transforms):
        raise PiCameraValueError(('invalid set of parameters for effect "%s"' % effect))
    param_transforms = param_transforms[0]
    params = tuple((transform(p) for (transform, p) in zip(param_transforms, params)))
    mp = mmal.MMAL_PARAMETER_IMAGEFX_PARAMETERS_T(mmal.MMAL_PARAMETER_HEADER_T(mmal.MMAL_PARAMETER_IMAGE_EFFECT_PARAMETERS, ct.sizeof(mmal.MMAL_PARAMETER_IMAGEFX_PARAMETERS_T)), effect=self.IMAGE_EFFECTS[effect], num_effect_params=len(params), effect_parameter=params)
    self._camera.control.params[mmal.MMAL_PARAMETER_IMAGE_EFFECT_PARAMETERS] = mp
    self._image_effect_params = value