We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug Trying to use a jpg extension image throws the message "Error: UnsupportedMedia"
To Reproduce stegano.exe hide -i a.jpg -m "test" -o b.jpg
Expected behavior jpg should be accepted as input, from the docs
Desktop (please complete the following information): Release version 0.5.3 I've tested this on both Windows and Linux.
Loking at the file:
crates/stegano-core/src/media/types.rs
It appears that it's not supposed to accept "jpg" as input since it only mentions "png" and "wav":
pub fn from_file(f: &Path) -> Result<Self> { if let Some(ext) = f.extension() { let ext = ext.to_str().unwrap().to_lowercase(); match ext.as_str() { "png" => Ok(Self::Image( image::open(f) .map_err(|_e| SteganoError::InvalidImageMedia)? .to_rgba8(), )), "wav" => { let mut reader = WavReader::open(f).map_err(|_e| SteganoError::InvalidAudioMedia)?; let spec = reader.spec(); let samples: Vec<i16> = reader.samples().map(|s| s.unwrap()).collect(); Ok(Self::Audio((spec, samples))) } _ => Err(SteganoError::UnsupportedMedia), } } else { Err(SteganoError::UnsupportedMedia) } } `
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
Trying to use a jpg extension image throws the message "Error: UnsupportedMedia"
To Reproduce
stegano.exe hide -i a.jpg -m "test" -o b.jpg
Expected behavior
jpg should be accepted as input, from the docs
Desktop (please complete the following information):
Release version 0.5.3
I've tested this on both Windows and Linux.
Loking at the file:
It appears that it's not supposed to accept "jpg" as input since it only mentions "png" and "wav":
The text was updated successfully, but these errors were encountered: