---
title: "Read Multiframe TIFF"
canonical: https://www.graphicsmill.com/samples/Codecs/Tiff/ReadMultiframeTiff_cs
product: "Graphics Mill"
source: "Codecs/Tiff/ReadMultiframeTiff.cs"
---

# Read Multiframe TIFF

Reads multiframe image in TIFF format.

## Instruction

Write a C# program that reads a multi-frame TIFF image and saves each frame as a separate JPEG image.

## Usings

```csharp
using Aurigma.GraphicsMill.Codecs;
```

## Code Snippet

```csharp
using (var reader = new TiffReader("WriteMultiframeTiff.tif"))
{
    for (int i = 0; i < reader.Frames.Count; i++)
    {
        using (var bitmap = reader.Frames[i].GetBitmap())
        {
            bitmap.Save("ReadMultiframeTiff_" + i + ".jpg");
        }
    }
}
```

## Explanation

Below is a C# code sample that demonstrates how to read each frame from a multi-frame TIFF image and save them individually as JPEG files.

This code iterates over all the frames in the TIFF file, converts each frame to a bitmap, and saves them as separate JPEG images with indexed filenames.

## Tags

- [Multiple frames](<https://www.graphicsmill.com/samples/tags/multi-frame_md>): Handling multi-frame image formats
- [Read](<https://www.graphicsmill.com/samples/tags/read_md>): Reading images with codecs
- [TIFF](<https://www.graphicsmill.com/samples/tags/tiff_md>): Reading and writing TIFF images

## Input

- [WriteMultiframeTiff.tif](<https://www.graphicsmill.com/samples/Codecs/compiled/Debug/WriteMultiframeTiff_tif>) (download)

## Output

- [ReadMultiframeTiff\_0.jpg](<https://www.graphicsmill.com/samples/Codecs/compiled/Debug/ReadMultiframeTiff_0_jpg>) (preview)
- [ReadMultiframeTiff\_1.jpg](<https://www.graphicsmill.com/samples/Codecs/compiled/Debug/ReadMultiframeTiff_1_jpg>) (preview)

## Used APIs

- [Aurigma.GraphicsMill.Codecs.Frame.GetBitmap](<https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Codecs_Frame_GetBitmap.htm.md>)
- [Aurigma.GraphicsMill.Codecs.FrameCollectionBase.Count](<https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Codecs_FrameCollectionBase_Count.htm.md>)
- [Aurigma.GraphicsMill.Codecs.TiffReader](<https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_TiffReader.htm.md>)
- [Aurigma.GraphicsMill.Codecs.TiffReader.Frames](<https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Codecs_TiffReader_Frames.htm.md>)
