---
title: "Save image C#: Save JPG, TIFF, BMP, and PNG in C# | Nutrient .NET SDK"
canonical_url: "https://www.nutrient.io/guides/dotnet/save-a-file/imaging-ftp/"
md_url: "https://www.nutrient.io/guides/dotnet/save-a-file/imaging-ftp.md"
last_updated: "2026-06-19T09:21:00.261Z"
description: "Discover how to save image files in .NET. Learn to convert to bitmap, vector, byte array, FTP, and remote URL with our easy-to-follow guide."
---

# Save images in C#

### Overview

[Overview](https://www.nutrient.io/guides/dotnet/save-a-file/imaging.md)

### To Bitmap

[To Bitmap](https://www.nutrient.io/guides/dotnet/save-a-file/imaging-bitmap.md)

### To Vector

[To Vector](https://www.nutrient.io/guides/dotnet/save-a-file/imaging-vector.md)

### To Byte Array

[To Byte Array](https://www.nutrient.io/guides/dotnet/save-a-file/imaging-byte-array.md)

### To FTP

[To FTP](https://www.nutrient.io/guides/dotnet/save-a-file/imaging-ftp.md)

### To Remote URL

[To Remote URL](https://www.nutrient.io/guides/dotnet/save-a-file/imaging-remote-url.md)

To save a GdPicture image to an FTP server, use the [`SaveToFTP` method](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPictureImaging~SaveToFTP.html) of the [`GdPictureImaging` class](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPictureImaging.html).

Main parameters:

- `imageID` — The GdPicture image identifier.

- `ImageFormat` — Output format as a member of the [`DocumentFormat` enumeration](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.DocumentFormat.html).

- `EncoderParameter` — Encoding/compression parameter (depends on format).

- `Host` — FTP host name.

In some cross-platform GdPicture.API (`net8.0`) environments, the `Host` parameter for `SaveToFTP(...)` may need to be provided as a full FTP URI (for example, `ftp://example.com`) rather than a bare host name (`example.com`). If you get an error like “The URI prefix is not recognized.”, retry with the `ftp://` prefix.

- `Path` — Destination path on the FTP server.

- `Login` / `Password` — FTP credentials.

- `FTPPort` — FTP port (usually `21`).

`SaveToFTP` returns a `GdPictureStatus`, which should be checked.

Typical `EncoderParameter` values:

- **JPEG** — Quality `1` to `100`

- **PNG** — Compression level `0` to `9`

- **TIFF** — Values from [`TiffCompression` enumeration](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.TiffCompression.html)

- **JPEG2000** — Compression rate `1` to `512`

- **WebP** — Quality `1` to `100`

- **Other formats** — Usually `0`

When you no longer need an image resource, release it with the [`ReleaseGdPictureImage` method](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPictureImaging~ReleaseGdPictureImage.html).

When transferring data to or from remote servers, you can optionally use the [`SetHttpTransferBufferSize` method](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPictureImaging~SetHttpTransferBufferSize.html) to specify the maximum package size of the transferred data. By default, the buffer size is `4096`.

The following example saves a previously loaded JPG image to an FTP server:

### C#

```csharp

using GdPicture14;
using System;

using GdPictureImaging gdPictureImaging = new GdPictureImaging();

int imageID = gdPictureImaging.CreateGdPictureImageFromFile(@"C:\temp\source.jpg");
if (imageID == 0)
{
    Console.WriteLine($"CreateGdPictureImageFromFile failed: {gdPictureImaging.GetStat()}");
    return;
}

gdPictureImaging.SetHttpTransferBufferSize(2048);

GdPictureStatus status = gdPictureImaging.SaveToFTP(
    imageID,
    DocumentFormat.DocumentFormatJPEG,
    75,
    "ftp.pspdfkit.com",
    "/demo/source.jpg",
    "user",
    "passw0rd",
    21);

if (status!= GdPictureStatus.OK)
{
    Console.WriteLine($"SaveToFTP failed: {status}");
}

gdPictureImaging.ReleaseGdPictureImage(imageID);

```

### VB.NET

```vb

Imports GdPicture14

Using gdPictureImaging As New GdPictureImaging()
    Dim imageID As Integer = gdPictureImaging.CreateGdPictureImageFromFile("C:\temp\source.jpg")
    If imageID = 0 Then
        Console.WriteLine($"CreateGdPictureImageFromFile failed: {gdPictureImaging.GetStat()}")
        Return
    End If

    gdPictureImaging.SetHttpTransferBufferSize(2048)

    Dim status As GdPictureStatus = gdPictureImaging.SaveToFTP(
        imageID,
        DocumentFormat.DocumentFormatJPEG,
        75,
        "ftp.pspdfkit.com",
        "/demo/source.jpg",
        "user",
        "passw0rd",
        21)

    If status <> GdPictureStatus.OK Then
        Console.WriteLine($"SaveToFTP failed: {status}")
    End If

    gdPictureImaging.ReleaseGdPictureImage(imageID)
End Using

```
---

## Related pages

- [Save a file from the annotation manager in C#](/guides/dotnet/save-a-file/annotation-to-jpg.md)
- [Save a file from the annotation manager in C#](/guides/dotnet/save-a-file/annotation-to-tiff.md)
- [Save images in C#](/guides/dotnet/save-a-file/imaging-bitmap.md)
- [Save images in C#](/guides/dotnet/save-a-file/imaging-vector.md)
- [Save a file from the annotation manager in C#](/guides/dotnet/save-a-file/annotation-to-pdf.md)
- [Save images in C#](/guides/dotnet/save-a-file/imaging-remote-url.md)
- [Save images in C#](/guides/dotnet/save-a-file/imaging.md)
- [Save a file from the annotation manager in C#](/guides/dotnet/save-a-file/annotation-to-xmp.md)
- [Save PDF files in C#](/guides/dotnet/save-a-file/pdf-incremental-to-stream.md)
- [Save images and PDF files in C#](/guides/dotnet/save-a-file.md)
- [Save images in C#](/guides/dotnet/save-a-file/imaging-byte-array.md)
- [Save PDF files in C#](/guides/dotnet/save-a-file/pdf-incremental.md)
- [Save PDF files in C#](/guides/dotnet/save-a-file/pdf.md)
- [Save PDF files in C#](/guides/dotnet/save-a-file/pdf-local-storage.md)
- [Save PDF files in C#](/guides/dotnet/save-a-file/pdf-stream.md)

