BackgroundColorResource Class
The resource with border information of image print settings.
Inheritance Hierarchy
SystemObject
  Aspose.PSD.FileFormats.PsdResourceBlock
    Aspose.PSD.FileFormats.Psd.ResourcesBackgroundColorResource

Namespace: Aspose.PSD.FileFormats.Psd.Resources
Assembly: Aspose.PSD (in Aspose.PSD.dll) Version: 21.11
Syntax
public sealed class BackgroundColorResource : ResourceBlock

The BackgroundColorResource type exposes the following members.

Constructors
  NameDescription
Public methodBackgroundColorResource
Initializes a new instance of the BackgroundColorResource class
Properties
  NameDescription
Public propertyCode exampleColor
Gets or sets the background color.
Public propertyCode exampleDataSize
Gets the resource data size in bytes.
(Overrides ResourceBlockDataSize.)
Public propertyID
Gets or sets the unique identifier for the resource.
(Inherited from ResourceBlock.)
Public propertyCode exampleMinimalVersion
Gets the minimal required PSD version.
(Overrides ResourceBlockMinimalVersion.)
Public propertyName
Gets or sets the resource name. Pascal string, padded to make the size even (a null name consists of two bytes of 0).
(Inherited from ResourceBlock.)
Public propertySignature
Gets the resource signature. Should be always '8BIM'.
(Inherited from ResourceBlock.)
Public propertySize
Gets the resource block size in bytes including its data.
(Inherited from ResourceBlock.)
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodSave
Saves the resource block to the specified stream.
(Inherited from ResourceBlock.)
Public methodToString (Inherited from Object.)
Public methodValidateValues
Validates the resource values.
(Inherited from ResourceBlock.)
Examples
The following example demonstrates the support of BackgroundColorResource resource.
[C#]

string sourceFilePath = "input.psd";
string outputFilePath = "output.psd";

using (var image = (PsdImage)Image.Load(sourceFilePath))
{
    ResourceBlock[] imageResources = image.ImageResources;
    BackgroundColorResource backgroundColorResource = null;
    foreach (var imageResource in imageResources)
    {
        if (imageResource is BackgroundColorResource)
        {
            backgroundColorResource = (BackgroundColorResource)imageResource;
            break;
        }
    }

    // update BackgroundColorResource
    backgroundColorResource.Color = Color.DarkRed;

    image.Save(outputFilePath);
}
See Also