FilterEffectMaskData Constructor
Initializes a new instance of the FilterEffectMaskData class.

Namespace: Aspose.PSD.FileFormats.Psd.Layers.LayerResources
Assembly: Aspose.PSD (in Aspose.PSD.dll) Version: 22.5
Syntax
public FilterEffectMaskData(
	string guid,
	Rectangle rectangle,
	int pixelsDepth,
	int maxChannels,
	ChannelInformation[] channels,
	ChannelInformation userMask,
	Rectangle maskRectangle,
	ChannelInformation sheetMask
)

Parameters

guid
Type: SystemString
The resource guid.
rectangle
Type: Aspose.PSDRectangle
The channels rectangle.
pixelsDepth
Type: SystemInt32
The pixels depth.
maxChannels
Type: SystemInt32
The max channels value.
channels
Type: Aspose.PSD.FileFormats.Psd.LayersChannelInformation
The channels.
userMask
Type: Aspose.PSD.FileFormats.Psd.LayersChannelInformation
The user mask.
maskRectangle
Type: Aspose.PSDRectangle
The sheet mask rectangle.
sheetMask
Type: Aspose.PSD.FileFormats.Psd.LayersChannelInformation
The sheet mask.
Examples
This example demonstrates how to get and set properties of the FXidResource resource.
[C#]

string inputFilePath = "psdnet414_3.psd";
string output = "out_psdnet414_3.psd";

int resLength = 1144;
int maskLength = 369;

void AssertAreEqual(object expected, object actual, string message = null)
{
    if (!object.Equals(expected, actual))
    {
        throw new FormatException(message ?? "Objects are not equal.");
    }
}

using (var psdImage = (PsdImage)Image.Load(inputFilePath))
{
    FXidResource fXidResource = (FXidResource)psdImage.GlobalLayerResources[3];

    AssertAreEqual(resLength, fXidResource.Length);
    foreach (var maskData in fXidResource.FilterEffectMasks)
    {
        AssertAreEqual(maskLength, maskData.Length);
    }

    psdImage.Save(output);
}

// check after saving
using (var psdImage = (PsdImage)Image.Load(output))
{
    FXidResource fXidResource = (FXidResource)psdImage.GlobalLayerResources[3];

    AssertAreEqual(resLength, fXidResource.Length);
    foreach (var maskData in fXidResource.FilterEffectMasks)
    {
        AssertAreEqual(maskLength, maskData.Length);
    }
}
See Also