# Load an image for conversion in C#

### PDF

[PDF](https://www.nutrient.io/guides/dotnet/load-a-file/converter/from-local-storage-pdf.md)

### MS Office

[MS Office](https://www.nutrient.io/guides/dotnet/load-a-file/converter/from-local-storage-office.md)

### Image

[Image](https://www.nutrient.io/guides/dotnet/load-a-file/converter/from-local-storage-image.md)

### Bitmap

[Bitmap](https://www.nutrient.io/guides/dotnet/load-a-file/converter/from-local-storage-bitmap.md)

### SVG

[SVG](https://www.nutrient.io/guides/dotnet/load-a-file/converter/from-local-storage-svg.md)

### TIFF

[TIFF](https://www.nutrient.io/guides/dotnet/load-a-file/converter/from-local-storage-tiff.md)

### More...

[More...](https://www.nutrient.io/guides/dotnet/load-a-file/converter/from-local-storage-more.md)

To load an image for conversion, use the [`LoadFromFile` method](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureDocumentConverter~LoadFromFile.html) from the [`GdPictureDocumentConverter` class](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureDocumentConverter.html).

`LoadFromFile` accepts:

- `FilePath` — Path to the input image.

- `DocumentFormat` (optional) — A member of the [`DocumentFormat` enumeration](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.DocumentFormat.html).

For example:

- JPEG — `DocumentFormat.DocumentFormatJPEG`

- PNG — `DocumentFormat.DocumentFormatPNG`

- TIFF — `DocumentFormat.DocumentFormatTIFF`

- JPEG 2000 — `DocumentFormat.DocumentFormatJP2`

`LoadFromFile` returns a `GdPictureStatus`, which should always be checked before conversion.

To load and convert an image from local storage, use the following code:

### C#

```csharp

using GdPicture14;
using System;

using GdPictureDocumentConverter converter = new GdPictureDocumentConverter();

GdPictureStatus status = converter.LoadFromFile(
    @"C:\temp\source.jpeg",
    DocumentFormat.DocumentFormatJPEG);

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

status = converter.SaveAsPDF(@"C:\temp\output.pdf");
if (status!= GdPictureStatus.OK)
{
    Console.WriteLine($"SaveAsPDF failed: {status}");
}

```

### VB.NET

```vb

Imports GdPicture14

Using converter As New GdPictureDocumentConverter()
    Dim status As GdPictureStatus = converter.LoadFromFile(
        "C:\temp\source.jpeg",
        DocumentFormat.DocumentFormatJPEG)

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

    status = converter.SaveAsPDF("C:\temp\output.pdf")
    If status <> GdPictureStatus.OK Then
        Console.WriteLine($"SaveAsPDF failed: {status}")
    End If
End Using

```
---

## Related pages

- [Load a TIFF for conversion in C#](/guides/dotnet/load-a-file/converter/from-local-storage-tiff.md)
- [Load a PDF for conversion in C#](/guides/dotnet/load-a-file/converter/from-local-storage-pdf.md)
- [Load any file for conversion in C#](/guides/dotnet/load-a-file/converter/from-local-storage-more.md)
- [Load a bitmap (BMP) for conversion in C#](/guides/dotnet/load-a-file/converter/from-local-storage-bitmap.md)
- [Load and convert a bitmap image from a remote URL in C#](/guides/dotnet/load-a-file/converter/from-remote-url-bitmap.md)
- [Load an Office document for conversion in C#](/guides/dotnet/load-a-file/converter/from-local-storage-office.md)
- [Load a vector image (SVG) for conversion in C#](/guides/dotnet/load-a-file/converter/from-local-storage-svg.md)
- [Load and convert an SVG image from a remote URL in C#](/guides/dotnet/load-a-file/converter/from-remote-url-svg.md)
- [Convert documents from remote URLs using C#](/guides/dotnet/load-a-file/converter/from-remote-url-office.md)
- [Load an image for conversion from a stream in C#](/guides/dotnet/load-a-file/converter/from-stream-image.md)
- [Load any file for conversion from a remote URL in C#](/guides/dotnet/load-a-file/converter/from-remote-url-more.md)
- [Load an image for conversion from a remote URL in C#](/guides/dotnet/load-a-file/converter/from-remote-url-image.md)
- [Load a TIFF for conversion from a remote URL in C#](/guides/dotnet/load-a-file/converter/from-remote-url-tiff.md)
- [Load a PDF for conversion from a remote URL in C#](/guides/dotnet/load-a-file/converter/from-remote-url-pdf.md)
- [Load an Office document for conversion from a stream in C#](/guides/dotnet/load-a-file/converter/from-stream-office.md)
- [Load a bitmap (BMP) for conversion from a stream in C#](/guides/dotnet/load-a-file/converter/from-stream-bitmap.md)
- [Load a PDF for conversion from a stream in C#](/guides/dotnet/load-a-file/converter/from-stream-pdf.md)
- [Load a vector image (SVG) for conversion from a stream in C#](/guides/dotnet/load-a-file/converter/from-stream-svg.md)
- [Load any file for conversion from a stream in C#](/guides/dotnet/load-a-file/converter/from-stream-more.md)
- [Load a TIFF for conversion from a stream in C#](/guides/dotnet/load-a-file/converter/from-stream-tiff.md)

