Skip to content

Crate for simple cropping and watermarking of images.

Notifications You must be signed in to change notification settings

chakrit/image-watermark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IMAGE-WATERMARK

use image_watermark::*;

let lines = vec![
    Line::new(
        TEST_FONT,
        128.0,
        colors::from(TEST_WATERMARK_COLOR),
        "the quick brown fox jumps over the lazy dog",
    )
    .unwrap(),
];

let ops = vec![
    Op::Scale(0.8),
    Op::Crop(0.5, 0.8),
    Op::Watermark(0.8, lines),
];

let out_buf = apply(TEST_INPUT_IMAGE.to_vec(), ops).unwrap();
let out_path = std::path::Path::new("./output.png");
std::fs::write(&out_path, &out_buf).unwrap();

About

Crate for simple cropping and watermarking of images.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages