---
title: "PsdProcessor.FrameCallback Property "
canonical: https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Templates_PsdProcessor_FrameCallback.htm
archived: false
applies_to:
  - product: "Graphics Mill"
    versions: ["12.1", "6.x-12.x (may differ)"]
    entity_id: "https://www.graphicsmill.com/#software-application"
---

# PsdProcessor.FrameCallback Property 

**Applies to:** Graphics Mill 12.1, 6.x-12.x (may differ)
 
Gets or sets the callback function that processes image layers. The function should accept an alias for the calling object and a [PsdFrame](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_Psd_PsdFrame.htm.md) and return a [GraphicsContainer](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Drawing_GraphicsContainer.htm.md). It is convenient to use lambda expressions as demonstrated below.
 
**Namespace:** [Aurigma.GraphicsMill.Templates](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Templates.htm.md)
 **Assembly:** Aurigma.GraphicsMill.Templates (in Aurigma.GraphicsMill.Templates.dll)
 
## Syntax
  
```csharp
public Func<PsdProcessor, PsdFrame, GraphicsContainer> FrameCallback { get; set; }
```
 
## Examples
  
```csharp
var psdProcessor = new PsdProcessor();

psdProcessor.FrameCallback = (processor, frame) =>
{
    if (frame.Type != FrameType.Raster)
        return processor.ProcessFrame(frame);

    using (var invert = new Invert())
    {
        var graphicsContainer = new GraphicsContainer(frame.X + frame.Width, frame.Y + frame.Height, frame.DpiX, frame.DpiY);

        using (var graphics = graphicsContainer.GetGraphics())
        {
            graphics.DrawImage(frame + invert, frame.X, frame.Y);
        }

        return graphicsContainer;
    }
};

psdProcessor.Render(@"Images\BusinessCard.psd", @"Images\Output\InvertBackground.pdf");
```
   
## See Also

### Reference

- [PsdProcessor Class](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Templates_PsdProcessor.htm.md)
- [Aurigma.GraphicsMill.Templates Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Templates.htm.md)
