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
why are these not equal
assert_eq!(img.get_raw_pixels().len(), img.get_bytes().len())
@igrep @rsk700 @Horki @Clivern @samuelvanderwaal
The text was updated successfully, but these errors were encountered:
@HarrisDePerceptron
/// Convert the PhotonImage to raw bytes. Returns JPEG. pub fn get_bytes(&self) -> Vec<u8> { let mut img = helpers::dyn_image_from_raw(self); img = ImageRgba8(img.to_rgba8()); let mut buffer = vec![]; img.write_to(&mut buffer, image::ImageOutputFormat::Png) .unwrap(); buffer }
As the doc comment says, get_bytes is meant to be an encoded image, which is different. Although it seems it returns a PNG, not JPEG.
get_bytes
Sorry, something went wrong.
No branches or pull requests
why are these not equal
@igrep @rsk700 @Horki @Clivern @samuelvanderwaal
The text was updated successfully, but these errors were encountered: