/// Encodes the image into the family using the given icon type.  If the
/// selected type has an associated mask type, the image mask will also be
/// added to the family.  Returns an error if the image has the wrong
/// dimensions for the selected type.
Encodes the image into the family using the given icon type.  If the
selected type has an associated mask type, the image mask will also be
added to the family.  Returns an error if the image has the wrong
dimensions for the selected type.
Encodes the image into the family using the given icon type . If the selected type has an associated mask type the image mask will also be added to the family . Returns an error if the image has the wrong dimensions for the selected type .
pub fn add_icon_with_type(&mut self,
                              image: &Image,
                              icon_type: IconType)
                              -> io::Result<()> {
        self.elements
            .push(IconElement::encode_image_with_type(image, icon_type)?);
        if let Some(mask_type) = icon_type.mask_type() {
            self.elements
                .push(IconElement::encode_image_with_type(image,
                                                               mask_type)?);
        }
        Ok(())
    }
pub fn add_icon_with_type ( & mut self , image : & Image , icon_type : IconType ) -> io :: Result < ( ) > { self . elements . push ( IconElement :: encode_image_with_type ( image , icon_type ) ? ) ; if let Some ( mask_type ) = icon_type . mask_type ( ) { self . elements . push ( IconElement :: encode_image_with_type ( image , mask_type ) ? ) ; } Ok ( ( ) ) }
Encodes the image into the family using the given icon type.
Encodes the image into the family using the given icon type .
&mut self
image
&Image
icon_type
IconType