---
title: "PsdFrame Class"
canonical: https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_Psd_PsdFrame.htm
product: "Graphics Mill"
---

# PsdFrame Class
 
Represents a PSD layer.
 
**Namespace:** [Aurigma.GraphicsMill.Codecs.Psd](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Codecs_Psd.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public class PsdFrame : Frame
```
 
## Examples
  
The following code opens a PSD file, iterates through its layers, and saves bitmaps from the raster layers to separate PNG files:
 
```csharp
//create PSD reader
using (var reader = new PsdReader(@"Images\BusinessCard.psd"))
{
    //read layers and save raster layers in PNG files
    for (int i = 0; i < reader.Frames.Count; i++)
    {
        using (var frame = reader.Frames[i])
        {
            Console.WriteLine("Frame " + frame.Index + " is processing. Frame type is " + frame.Type + ".");

            if (frame.Type == FrameType.Raster)
            {
                using (var bitmap = frame.GetBitmap())
                {
                    bitmap.Save(@"Images\Output\frame_" + i + ".png");
                }
            }
        }
    }
}
```
 
## Inheritance Hierarchy
  
- System.Object
    - [Aurigma.GraphicsMill.PipelineElement](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_PipelineElement.htm.md)
        - [Aurigma.GraphicsMill.Codecs.Frame](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_Frame.htm.md)
            - Aurigma.GraphicsMill.Codecs.Psd.PsdFrame
                - [Aurigma.GraphicsMill.Codecs.Psd.PsdShapeFrame](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_Psd_PsdShapeFrame.htm.md)
                - [Aurigma.GraphicsMill.Codecs.Psd.PsdGroupFrame](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_Psd_PsdGroupFrame.htm.md)
                - [Aurigma.GraphicsMill.Codecs.Psd.PsdTextFrame](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_Psd_PsdTextFrame.htm.md)
                - [Aurigma.GraphicsMill.Codecs.Psd.PsdSmartFrame](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_Psd_PsdSmartFrame.htm.md)
 
## Thread Safety
 Static members of this type are not safe for multi-threaded operations. Instance members of this type are not safe for multi-threaded operations.
   
## See Also

### Reference

- [PsdFrame Members](https://www.graphicsmill.com/docs/gm/AllMembers_T_Aurigma_GraphicsMill_Codecs_Psd_PsdFrame.htm.md)
- [Aurigma.GraphicsMill.Codecs.Psd Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Codecs_Psd.htm.md)

### Manual

- [Loading Raster Layers](https://www.graphicsmill.com/docs/gm/loading-raster-layers.htm.md)
