# ImageCollection.Remove Method

> Removes an image from a Text Control document.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl > ImageCollection.Remove Method
- **621 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/imagecollection/remove-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/imagecollection/remove-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/imagecollection/remove-method/llms-full.txt

---

### Description

Removes an image from a Text Control document.

### Syntax

```csharp
public bool Remove(Image image);
```

```vbnet
Public Function Remove(image As Image) As Boolean
```

### Parameters

| Parameter | Description |
|---|---|
| image | Specifies the image to remove. |

### Return Value

The return value is true, if the image could be removed. Otherwise, it is false.

### Examples

The following example removes a document logo after locating it by name.

```csharp
TXTextControl.Image logo = new() { FileName = @"Images\company-logo.png", Name = "CompanyLogo", DescriptiveText = "Company logo" };
textControl.Images.Add(logo, -1);
TXTextControl.Image image = textControl.Images.GetItem("CompanyLogo");
if (image != null)
{
    textControl.Images.Remove(image);
}
```

```vbnet
Dim logo As New TXTextControl.Image() With { .FileName = "Images\company-logo.png", .Name = "CompanyLogo", .DescriptiveText = "Company logo" }
textControl.Images.Add(logo, -1)
Dim image As TXTextControl.Image = textControl.Images.GetItem("CompanyLogo")
If image IsNot Nothing Then
    textControl.Images.Remove(image)
End If
```

---

## Nearby

- **Previous:** [ImageCollection.ImportFilters Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/imagecollection/importfilters-property/llms-full.txt)
- **Next:** [ImageEventArgs Class](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/imageeventargs/llms-full.txt)
