EmbarkStudios / texture-synthesis

🎨 Example-based texture synthesis written in Rust 🦀

Home Page:http://embark.rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to add example as image bytes/array, not path?

baleksey opened this issue · comments

I can't understand how to add images not by path, but as already loaded to memory images? With complex image manipulation pipeline it's quite uncomfortable to save image to disk right before using texture-synthesis. Thanks!

Just found:

let example_img = ts::image::open("/path/to/image.jpg").unwrap();
let texsynth = ts::Session::builder()
.add_example(example_img)
.build().expect("failed to build session");