Share via


IImageGenerator Interface

Definition

Represents a generator of images.

public interface class IImageGenerator : IDisposable
[System.Diagnostics.CodeAnalysis.Experimental("MEAI001")]
public interface IImageGenerator : IDisposable
public interface IImageGenerator : IDisposable
[<System.Diagnostics.CodeAnalysis.Experimental("MEAI001")>]
type IImageGenerator = interface
    interface IDisposable
type IImageGenerator = interface
    interface IDisposable
Public Interface IImageGenerator
Implements IDisposable
Derived
Attributes
Implements

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

(Inherited from IDisposable)
GenerateAsync(ImageGenerationRequest, ImageGenerationOptions, CancellationToken)

Sends an image generation request and returns the generated image as a ImageGenerationResponse.

GetService(Type, Object)

Asks the IImageGenerator for an object of the specified type serviceType.

Extension Methods

AsBuilder(IImageGenerator)

Creates a new ImageGeneratorBuilder using innerGenerator as its inner generator.

EditImageAsync(IImageGenerator, DataContent, String, ImageGenerationOptions, CancellationToken)

Edits a single image based on the original image and the specified prompt.

EditImageAsync(IImageGenerator, ReadOnlyMemory<Byte>, String, String, ImageGenerationOptions, CancellationToken)

Edits a single image based on a byte array and the specified prompt.

EditImagesAsync(IImageGenerator, IEnumerable<AIContent>, String, ImageGenerationOptions, CancellationToken)

Edits images based on original images and a text prompt.

GenerateImagesAsync(IImageGenerator, String, ImageGenerationOptions, CancellationToken)

Generates images based on a text prompt.

GetRequiredService(IImageGenerator, Type, Object)

Asks the IImageGenerator for an object of the specified type serviceType and throws an exception if one isn't available.

GetRequiredService<TService>(IImageGenerator, Object)

Asks the IImageGenerator for an object of type TService and throws an exception if one isn't available.

GetService<TService>(IImageGenerator, Object)

Asks the IImageGenerator for an object of type TService.

Applies to