Class IfxsResource
IfxsResource class
Ifxs resource (group layer effects resource)
public sealed class IfxsResource : BaseFxResource
Constructors
Properties
| Name | Description |
|---|
| DescriptorVersion { get; } | Gets the descriptor version. |
| Key { get; } | Gets the layer resource key. |
| override Length { get; } | Gets the layer resource length in bytes. |
| PsdVersion { get; } | Gets the minimal psd version required for layer resource. 0 indicates no restrictions. |
| virtual Signature { get; } | Gets the signature. |
Methods
| Name | Description |
|---|
| override Save(StreamContainer, int) | Saves the resource to the specified stream container. |
| override ToString() | Returns a String that represents this instance. |
Fields
| Name | Description |
|---|
| const TypeToolKey | The type tool info key. |
Examples
The following code demonstrates the support of IfxsResource.
[C#]
string sourceFile = "example.psd";
string outputFile = "export.psd";
var loadOptions = new PsdLoadOptions()
{
LoadEffectsResource = true,
};
using (var psdImage = (PsdImage)Image.Load(sourceFile, loadOptions))
{
// Example has 2 group layers with effects
// Group layer with one effect
LayerGroup layerGroupOne = (LayerGroup)psdImage.Layers[2];
// Group layer with many effects
LayerGroup layerGroupMany = (LayerGroup)psdImage.Layers[5];
// Get the number of effects and verify their quantity
int effectCountOne = layerGroupOne.BlendingOptions.Effects.Length;
int effectCountMany = layerGroupMany.BlendingOptions.Effects.Length;
// One effect in the group layer is in resource 'IfxsResource'
IfxsResource ifxsResource = (IfxsResource)layerGroupOne.Resources[0];
// Two or more effects in a group layer are in resource 'ImfxResource'
ImfxResource imfxResource = (ImfxResource)layerGroupMany.Resources[0];
// Add a third shadow to a group layer with multiple effects
layerGroupMany.BlendingOptions.AddDropShadow();
psdImage.Save(outputFile);
}
See Also