Class VibAResource
VibAResource class
VibA Resource.
public class VibAResource : AdjustmentLayerResource
Constructors
Name | Description |
---|
VibAResource() | Initializes a new instance of the VibAResource class. |
Properties
Name | Description |
---|
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. |
Saturation { get; set; } | Gets or sets saturation value |
virtual Signature { get; } | Gets the signature. |
Vibrance { get; set; } | Gets or sets vibrance value |
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 example demonstrates the support of the VibAResource resource.
[C#]
// Example of the support of read and write Vibration Resource at runtime.
string sourceFileName = "VibranceResource.psd";
string outputFileName = "out_VibranceResource.psd";
using (PsdImage image = (PsdImage)Image.Load(sourceFileName))
{
foreach (var layer in image.Layers)
{
foreach (var resource in layer.Resources)
{
if (resource is VibAResource)
{
var vibranceResource = (VibAResource)resource;
int vibranceValue = vibranceResource.Vibrance;
int saturationValue = vibranceResource.Saturation;
vibranceResource.Vibrance = vibranceValue * 2;
vibranceResource.Saturation = saturationValue * 2;
break;
}
}
}
image.Save(outputFileName);
}
See Also