# PictureSource Class

> PictureSource class in the TX Sheet Control .NET API: Embedded image bytes or base64; external image URLs are not downloaded.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Class
- **Namespace:** `TXTextControl.TXSheetControl.Server`
- **Package:** `TXTextControl.TXSheetControl.Server` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Package:** `TXTextControl.TXSheetControl.Blazor` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Implements:** `System.IEquatable<TXTextControl.TXSheetControl.Server.PictureSource>`
- **Path:** TX Sheet Control > API Reference > .NET API > TXTextControl.TXSheetControl.Server > PictureSource Class
- **753 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/picturesource/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/picturesource/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/picturesource/llms-full.txt

---

Embedded image bytes or base64; external image URLs are not downloaded.

### Syntax

```csharp
public class PictureSource
```

Interfaces: `IEquatable<PictureSource>`.

### Members

#### Constructors

| Constructor | Description |
|---|---|
| [Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/picturesource/constructor/llms-full.txt) |  |

#### Properties

| Property | Description |
|---|---|
| [AltText](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/picturesource/alttext-property/llms-full.txt) |  |
| [Base64](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/picturesource/base64-property/llms-full.txt) |  |
| [MimeType](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/picturesource/mimetype-property/llms-full.txt) |  |

#### Methods

| Method | Description |
|---|---|
| [FromBytes](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/picturesource/frombytes-method/llms-full.txt) | Creates or updates a document-bound handle or queued operation; the owning workbook retains validation authority. |

### Examples

Create a working document workflow using PictureSource. Return the generated document or application data to the caller.

```csharp
using TXTextControl.TXSheetControl.Server;

async Task<byte[]> BuildPictureSourceExampleAsync(ServerSheetControl control, byte[] logoPng)
{
    var book = control.Workbook;
    var sheet = await book.Sheets.AtAsync(0);
    var logo = PictureSource.FromBytes(logoPng, "image/png", "Alpine Design logo");
    await sheet.Drawings.AddPictureAsync(new { source = logo, anchor = new { cell = "A1" }, size = new { width = 160, height = 60 } });
    return await control.SaveAsync(StreamType.PDF);
}
```

### See Also

- [TXTextControl.TXSheetControl.Server Namespace](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/llms-full.txt)
- [Pictures and Shapes](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/pictures-shapes/llms-full.txt)

---

## In This Section

- [PictureSource.AltText Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/picturesource/alttext-property/llms-full.txt): PictureSource.AltText property in the TX Sheet Control .NET API, with its syntax, its type string?, a C# example and remarks on awaiting tasks and handles.
- [PictureSource.Base64 Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/picturesource/base64-property/llms-full.txt): PictureSource.Base64 property in the TX Sheet Control .NET API, with its syntax, its type string, a C# example and remarks on awaiting tasks and handles.
- [PictureSource Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/picturesource/constructor/llms-full.txt): PictureSource constructor in the TX Sheet Control .NET API, with the parameters Base64, MimeType and AltText and a C# example.
- [PictureSource.FromBytes Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/picturesource/frombytes-method/llms-full.txt): PictureSource.FromBytes method in the TX Sheet Control .NET API: Creates or updates a document-bound handle or queued operation.
- [PictureSource.MimeType Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/picturesource/mimetype-property/llms-full.txt): PictureSource.MimeType property in the TX Sheet Control .NET API, with its syntax, its type string?, a C# example and remarks on awaiting tasks and handles.

---

## Nearby

- **Previous:** [PdfViewerPreferences.ViewClip Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/pdfviewerpreferences/viewclip-property/llms-full.txt)
- **Next:** [PictureSource Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/picturesource/constructor/llms-full.txt)
