pub fn load_from_png(
		&mut self,
		png_data: Vec<u8>,
		config: &VeraImageSetLoadConfig,
	) -> Result<(), Error> {
		self.reset();

		let (f_r, f_c) = png_to_frames(
			&self.id,
			self.frame_width,
			self.frame_height,
			png_data,
			&mut self.frame_data,
		)?;

		self.frames_per_row = f_r;
		self.frames_per_col = f_c;

		if config.cull_duplicates {
			self.remove_duplicate_frames()?;
		}
		info!("Image parsed successfully");
		Ok(())
	}
/// Load raw RGB values from a png
/// Use indices according to the palette as it currently exists
/// Then load indices from colour values, which will fail if any colour value
/// in the PNG can't be found in the palette
Load raw RGB values from a png
Use indices according to the palette as it currently exists
Then load indices from colour values, which will fail if any colour value
in the PNG can't be found in the palette
Load raw RGB values from a png Use indices according to the palette as it currently exists Then load indices from colour values which will fail if any colour value in the PNG can ' t be found in the palette
pub fn load_from_png(
		&mut self,
		png_data: Vec<u8>,
		config: &VeraImageSetLoadConfig,
	) -> Result<(), Error> {
		self.reset();
		let (f_r, f_c) = png_to_frames(
			&self.id,
			self.frame_width,
			self.frame_height,
			png_data,
			&mut self.frame_data,
		)?;
		self.frames_per_row = f_r;
		self.frames_per_col = f_c;
		if config.cull_duplicates {
			self.remove_duplicate_frames()?;
		}
		info!("Image parsed successfully");
		Ok(())
	}
pub fn load_from_png ( & mut self , png_data : Vec < u8 > , config : & VeraImageSetLoadConfig , ) -> Result < ( ) , Error > { self . reset ( ) ; let ( f_r , f_c ) = png_to_frames ( & self . id , self . frame_width , self . frame_height , png_data , & mut self . frame_data , ) ? ; self . frames_per_row = f_r ; self . frames_per_col = f_c ; if config . cull_duplicates { self . remove_duplicate_frames ( ) ? ; } info ! ( " " ) ; Ok ( ( ) ) }
Load raw RGB values from a png
Use indices according to the palette as it currently exists
Then load indices from colour values, which will fail if any colour value
in the PNG can't be found in the palette
Load raw RGB values from a png Use indices according to the palette as it currently exists Then load indices from colour values which will fail if any colour value in the PNG can ' t be found in the palette
&mut self
png_data
Vec<u8>
config
&VeraImageSetLoadConfig