This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/dotnet/load-a-file/imaging/from-remote-url-tiff.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Load a TIFF from a remote URL in C# .NET | Nutrient .NET SDK
TIFF

To load a TIFF image from a remote URL, use the CreateGdPictureImageFromHTTP method from the GdPictureImaging class.

This method returns a non-zero image identifier (imageID) on success. If it fails, it returns 0 — use GetStat() and GetLastTransferError() to diagnose failures.

It supports two common scenarios:

If the loaded TIFF has multiple pages, you can use:

Note:

  • In some GdPicture.API cross-platform setups, TIFF files loaded via CreateGdPictureImageFromHTTP(...) can still be converted/saved successfully, while TIFF-specific page APIs (for example, TiffGetPageCount/TiffSelectPage) may return UnsupportedImageFormat. If this happens, treat the loaded content as a single raster image for save/export operations, or use a TIFF-specific loading workflow where multipage TIFF navigation is required.
  • When transferring data to or from remote servers, you can optionally use the SetHttpTransferBufferSize method to control transfer buffer size.

Loading a TIFF image from a public server

Use this overload: CreateGdPictureImageFromHTTP(string Host, string Path, int HTTPPort).

Remember to release the image resource once you stop using it. Use the ReleaseGdPictureImage method.

To load a TIFF image from a public server, use the following code:

using GdPicture14;
using System;
using GdPictureImaging gdpictureImaging = new GdPictureImaging();
int imageID = gdpictureImaging.CreateGdPictureImageFromHTTP(
"https://pspdfkit.com",
"/downloads/load-a-file/source.tif",
443);
if (imageID == 0)
{
Console.WriteLine($"HTTP load failed: {gdpictureImaging.GetStat()}");
Console.WriteLine($"Transfer error: {gdpictureImaging.GetLastTransferError()}");
return;
}
int pageCount = gdpictureImaging.TiffGetPageCount(imageID);
if (pageCount > 1)
{
GdPictureStatus selectStatus = gdpictureImaging.TiffSelectPage(imageID, 1);
if (selectStatus != GdPictureStatus.OK)
{
Console.WriteLine($"TiffSelectPage failed: {selectStatus}");
gdpictureImaging.ReleaseGdPictureImage(imageID);
return;
}
}
GdPictureStatus saveStatus = gdpictureImaging.SaveAsPNG(imageID, @"C:\temp\output.png");
if (saveStatus != GdPictureStatus.OK)
{
Console.WriteLine($"SaveAsPNG failed: {saveStatus}");
}
gdpictureImaging.ReleaseGdPictureImage(imageID);

Loading a TIFF image from a protected server

Use this overload: CreateGdPictureImageFromHTTP(string Uri, string Login, string Password).

Remember to release the image resource once you stop using it. Use the ReleaseGdPictureImage method.

To load a TIFF image from a protected server, use the following code:

using GdPicture14;
using System;
using GdPictureImaging gdpictureImaging = new GdPictureImaging();
int imageID = gdpictureImaging.CreateGdPictureImageFromHTTP(
"https://pspdfkit.com/downloads/load-a-file/source.tiff",
"admin",
"password");
if (imageID == 0)
{
Console.WriteLine($"HTTP load failed: {gdpictureImaging.GetStat()}");
Console.WriteLine($"Transfer error: {gdpictureImaging.GetLastTransferError()}");
return;
}
int pageCount = gdpictureImaging.TiffGetPageCount(imageID);
if (pageCount > 1)
{
GdPictureStatus selectStatus = gdpictureImaging.TiffSelectPage(imageID, 1);
if (selectStatus != GdPictureStatus.OK)
{
Console.WriteLine($"TiffSelectPage failed: {selectStatus}");
gdpictureImaging.ReleaseGdPictureImage(imageID);
return;
}
}
GdPictureStatus saveStatus = gdpictureImaging.SaveAsPNG(imageID, @"C:\temp\output.png");
if (saveStatus != GdPictureStatus.OK)
{
Console.WriteLine($"SaveAsPNG failed: {saveStatus}");
}
gdpictureImaging.ReleaseGdPictureImage(imageID);