Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ categories = ["encoding"]
license = "MIT"

[dependencies]
image = "0.23.0"
image = "0.25"

[badges]
travis-ci = { repository = "teovoinea/steganography" }
2 changes: 1 addition & 1 deletion src/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub struct Encoder<'a> {
impl<'a> Encoder<'a> {
/// Creates a new encoder with a buffer to write and an image to write it to
pub fn new(input: &[u8], img: DynamicImage) -> Encoder {
let img_as_rgba: ImageBuffer<Rgba<u8>, Vec<u8>> = img.to_rgba();
let img_as_rgba: ImageBuffer<Rgba<u8>, Vec<u8>> = img.to_rgba8();
Encoder{
img: img_as_rgba,
input
Expand Down
2 changes: 1 addition & 1 deletion src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub fn file_as_dynamic_image(filename: String) -> DynamicImage {

pub fn file_as_image_buffer(filename: String) -> ImageBuffer<Rgba<u8>, Vec<u8>> {
let img = open(&Path::new(&filename)).unwrap();
img.to_rgba()
img.to_rgba8()
}

pub fn save_image_buffer(img: ImageBuffer<Rgba<u8>, Vec<u8>>, filename: String) {
Expand Down