pub struct GeneratedImage { /* private fields */ }
Expand description

An image generated by a Session::run()

Implementations

Saves the generated image to the specified path

Writes the generated image to the specified stream

Saves debug information such as copied patches ids, map ids (if you have multi example generation) and a map indicating generated pixels the generator was “uncertain” of.

Get the coordinate transform of this generated image, which can be applied to new example images to get a different output image.

use texture_synthesis as ts;

// create a new session
let texsynth = ts::Session::builder()
    //load a single example image
    .add_example(&"imgs/1.jpg")
    .build().unwrap();

// generate an image
let generated = texsynth.run(None);

// now we can repeat the same transformation on a different image
let repeated_transform_image = generated
    .get_coordinate_transform()
    .apply(&["imgs/2.jpg"]);

Returns the generated output image

Trait Implementations

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.