implement invert instruction

This commit is contained in:
Schrottkatze 2024-01-01 21:18:56 +01:00
commit e7863402f3
4 changed files with 50 additions and 13 deletions

View file

@ -1,4 +1,4 @@
pub mod Read {
pub mod read {
use image::{io::Reader as ImageReader, DynamicImage};
use rpl::instructions::read::{Read, SourceType};
@ -12,7 +12,7 @@ pub mod Read {
}
}
pub mod Write {
pub mod write {
use image::{io::Reader as ImageReader, DynamicImage, ImageFormat};
use rpl::instructions::write::{TargetFormat, TargetType, Write};
@ -28,3 +28,14 @@ pub mod Write {
);
}
}
pub mod filters {
pub mod invert {
use image::DynamicImage;
pub fn invert(mut input_data: DynamicImage) -> DynamicImage {
input_data.invert();
input_data
}
}
}