#content #security #watermark #low-frequency

lf-watermark

Library for applying low frequency watermark to an image

1 unstable release

0.1.0 Nov 21, 2024

#8 in #watermark

Download history 139/week @ 2024-11-21 18/week @ 2024-11-28 35/week @ 2024-12-05

192 downloads per month

MIT license

1MB
106 lines

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"
    )

Dependencies

~8MB
~121K SLoC