Struct texture_synthesis::session::Session [−][src]
Texture synthesis session.
Calling run()
will generate a new image and return it, consuming the
session in the process. You can provide a GeneratorProgress
implementation
to periodically get updates with the currently generated image and the
number of pixels that have been resolved both in the current stage and
globally.
Example
let tex_synth = texture_synthesis::Session::builder() .seed(10) .tiling_mode(true) .add_example(&"imgs/1.jpg") .build().expect("failed to build session"); let generated_img = tex_synth.run(None); generated_img.save("my_generated_img.jpg").expect("failed to save image");
Implementations
impl Session
[src]
pub fn builder<'a>() -> SessionBuilder<'a>
[src]
Creates a new session with default parameters.
pub fn run(self, progress: Option<Box<dyn GeneratorProgress>>) -> GeneratedImage
[src]
Runs the generator and outputs a generated image.
Auto Trait Implementations
impl !RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnwindSafe for Session
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,