[−][src]Struct texture_synthesis::Session
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");
Methods
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. Now, only runs Multiresolution Stochastic Texture Synthesis. Might be interesting to include more algorithms in the future.
Auto Trait Implementations
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnwindSafe for Session
impl !RefUnwindSafe for Session
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,