← All SmartAdapters Imaging

SmartPictureBoxAdapter

Generates an image from a text description straight into a PictureBox using the DALL-E endpoint.

Attaches to PictureBox

Describe the picture you want and the adapter renders it into a PictureBox via the OpenAI DALL-E endpoint. From mock-ups to illustrations to placeholder art, the image appears in place.

It is the simplest way to add on-demand image generation to a desktop or web form.

Generation is asynchronous and the result lands as a regular image in the control, so saving, printing and re-use work exactly as they would with a loaded file.

What it gives you

  • Text-to-image generation in a PictureBox.
  • Backed by the OpenAIEndpointDallE endpoint.
  • Result is a standard image you can save or reuse.

Use it for

  • Illustrations and placeholder art on demand
  • Product mock-ups from a one-line description
  • Marketing visuals produced inside the app

Like every adapter, it runs through a SmartHub and inherits its SmartEndpoint — switching the model or provider never changes this code.

csharp
var hub = new SmartHub(this) {
    Endpoint = new OpenAIEndpointDallE()
};

var picture = new SmartPictureBoxAdapter {
    PictureBox = pictureBox1
};

await picture.GenerateAsync("a watercolor lighthouse at dawn");

Read the SmartPictureBoxAdapter docs ↗