pub fn generate_normal_map(
        &mut self,
        frame: u32,
        kernel_filter: KernelFilter,
        height_conversion_method: HeightConversionMethod,
        normal_alpha_result: NormalAlphaResult,
    ) -> Result<()> {
        if frame <= self.frame_count() {
            return Err(Error::InvalidParameters);
        }
        unsafe {
            ffi_try!(ffi::vlImageGenerateNormalMap(
                frame,
                kernel_filter as i32,
                height_conversion_method as i32,
                normal_alpha_result as i32
            ));
        }
        Ok(())
    }
/// Converts the image to a normal map using the data in the given frame.
///
/// # Errors
///
/// Returns `Err` if the normal map generation fails,
/// or if the parameters are incorrect for the current image.
Converts the image to a normal map using the data in the given frame.
Converts the image to a normal map using the data in the given frame .
pub fn generate_normal_map(
        &mut self,
        frame: u32,
        kernel_filter: KernelFilter,
        height_conversion_method: HeightConversionMethod,
        normal_alpha_result: NormalAlphaResult,
    ) -> Result<()> {
        if frame <= self.frame_count() {
            return Err(Error::InvalidParameters);
        }
        unsafe {
            ffi_try!(ffi::vlImageGenerateNormalMap(
                frame,
                kernel_filter as i32,
                height_conversion_method as i32,
                normal_alpha_result as i32
            ));
        }
        Ok(())
    }
pub fn generate_normal_map ( & mut self , frame : u32 , kernel_filter : KernelFilter , height_conversion_method : HeightConversionMethod , normal_alpha_result : NormalAlphaResult , ) -> Result < ( ) > { if frame <= self . frame_count ( ) { return Err ( Error :: InvalidParameters ) ; } unsafe { ffi_try ! ( ffi vlImageGenerateNormalMap ( frame kernel_filter as i32 height_conversion_method as i32 normal_alpha_result as i32 ) ) ; } Ok ( ( ) ) }
Converts the image to a normal map using the data in the given frame.
Converts the image to a normal map using the data in the given frame .
&mut self
frame
u32
kernel_filter
KernelFilter
height_conversion_method
HeightConversionMethod
normal_alpha_result
NormalAlphaResult
&mut self
frame
u32
kernel_filter
KernelFilter
height_conversion_method
HeightConversionMethod
normal_alpha_result
NormalAlphaResult
errors
Returns `Err` if the normal map generation fails,
or if the parameters are incorrect for the current image.
Returns ` Err ` if the normal map generation fails or if the parameters are incorrect for the current image .