        let mut context = Context::new(config).await?;

        let image = if let Some(file_name) = &self.file {
            let mut image_file = File::open(file_name)?;
            let mut image: Vec<u8> = Vec::new();
            image_file.read_to_end(&mut image)?;
            image
        } else if let Some(data) = &self.data {
            base64::decode(data)?
        } else {
            eprintln!("Neither image file or data given");
            return Err(anyhow::anyhow!("Required option missing"));
        };