lf-watermark

Crates.iolf-watermark
lib.rslf-watermark
version0.1.0
sourcesrc
created_at2024-11-21 06:52:33.638215
updated_at2024-11-21 06:52:33.638215
descriptionLibrary for applying low frequency watermark to an image.
homepage
repositoryhttps://github.com/biyard/secure-contents
max_upload_size
id1455780
size1,208,488
hackartist (hackartists)

documentation

README

Low frequency watermark

Usage this package

  • image crate will be utilized to open and save image
    • If you don't need to save and load from a file, you don't need to add image crate.
cargo add lf-watermark image

Example code

  • Simple example code to embed Hello, World! to an image by DCT.
    let img = image::open("image.png").unwrap();
    let watermark = "Hello, World!";
    let watermarked_img = lf_watermark::embed_watermark_color(&img, watermark);
    assert!(watermarked_img.is_ok(), "Failed to embed watermark");
    assert!(
        watermarked_img.unwrap().save("output.png").is_ok(),
        "Failed to save image"
    )
Commit count: 9

cargo fmt