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

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

The BorderInformationResource type exposes the following members.

Constructors
  NameDescription
Public methodBorderInformationResource
Initializes a new instance of the BorderInformationResource class
Properties
  NameDescription
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.)
Public propertyCode exampleUnit
Gets or sets the border units.
Public propertyCode exampleWidth
Gets or sets the border width.
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 BorderInformationResource resource.
[C#]

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

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

    // update BorderInformationResource
    borderInfoResource.Width = 0.1;
    borderInfoResource.Unit = PhysicalUnit.Inches;

    image.Save(outputFilePath);
}
See Also