- About Graphics Mill
- What's New?
- Breaking Changes in Graphics Mill 12
- Breaking Changes in Graphics Mill 11
- Features
- Supported File Formats
- System Requirements
- Getting Started
- Working with Image Formats
- Transforming Images (Resize, Rotate, Crop)
- Working with Metadata
- Color Management and Color Reduction
- Drawing Text and Graphics
- Color Keying (Green Screen Removal)
- Channels and Pixel Data
- Color and Tone Correction
- Working with Photoshop (PSD) Files
- Image Filters
- Processing Large Images
- Basics of Image Processing
- Troubleshooting
- Class Library Reference
- Aurigma.GraphicsMill Namespace
- Aurigma.GraphicsMill.Codecs Namespace
- Aurigma.GraphicsMill.Codecs.ClippingPath Namespace
- Aurigma.GraphicsMill.Codecs.Psd Namespace
- Aurigma.GraphicsMill.Drawing Namespace
- Aurigma.GraphicsMill.Drawing.Art Namespace
- Aurigma.GraphicsMill.Drawing.Effects Namespace
- Aurigma.GraphicsMill.Licensing Namespace
- Aurigma.GraphicsMill.Templates Namespace
- Aurigma.GraphicsMill.Transforms Namespace
- Licensing
- End User License Agreement
- Copyright Notices
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 and return a GraphicsContainer. It is convenient to use lambda expressions as demonstrated below.
Namespace:
Aurigma.GraphicsMill.Templates
Assembly:
Aurigma.GraphicsMill.Templates (in Aurigma.GraphicsMill.Templates.dll)
Syntax
C#
public Func<PsdProcessor, PsdFrame, GraphicsContainer> FrameCallback { get; set; }
Examples
C#
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");