encrypted-images/examples/create_an_image.rs

16 lines
558 B
Rust
Raw Normal View History

2024-07-16 23:40:41 +00:00
use encrypted_images::encryption::images::create_img;
fn main() {
let ciphertext = "VkdocGN5QkpjeUJRYkE9PZNY2MOW01NWpSxCtFG6acHuAWun+CElPQ/IIwd0gy+D+IiBqB/5+qo8Jr9bMBOwoih3amCtjXlkAlRKHX5fhqI=";
let style = "h";
let watermark = "bitcoin";
let r = Some(100);
let g = Some(134);
let b = Some(137);
if let Some(encoded_image) = create_img(ciphertext, style, watermark, r, g, b, None, None, None) {
println!("Encoded image: {}", encoded_image);
} else {
println!("Image creation or encoding failed.");
}
}