Class BorderInformationResource

  • public final class BorderInformationResource
    extends ResourceBlock

    The resource with border information of image print settings.

    Code example:

    An example of reading, modifying and saving a PSD file that contains a border information resource.

    String inPsdFilePath = "input.psd";
    String outPsdFilePath = "output.psd";
    // Load a PSD file containing a predefined image resource
    PsdImage psdImage = (PsdImage)Image.load(inPsdFilePath);
        ResourceBlock[] imageResources = psdImage.getImageResources();
        // Find first border information resource in image resources
        BorderInformationResource borderInfoResource = null;
        for (ResourceBlock imageResource : imageResources)
            if (imageResource instanceof BorderInformationResource)
                borderInfoResource = (BorderInformationResource)imageResource;
        // Update some properties of the border information resource
        // Save a modified copy of loaded PSD file on the path;

    • Constructor Detail

      • BorderInformationResource

        public BorderInformationResource()

        Initializes a new instance of the BorderInformationResource class.

    • Method Detail

      • getDataSize

        public int getDataSize()

        Gets the resource data size in bytes.

        Value: The resource data size.
        Specified by:
        getDataSize in class ResourceBlock
      • getMinimalVersion

        public int getMinimalVersion()

        Gets the minimal required PSD version.

        Value: The minimal PSD version.
        Specified by:
        getMinimalVersion in class ResourceBlock
      • getWidth

        public final double getWidth()

        Gets or sets the border width.

      • setWidth

        public final void setWidth(double value)

        Gets or sets the border width.

      • getUnit

        public final int getUnit()

        Gets or sets the border units.

      • setUnit

        public final void setUnit(int value)

        Gets or sets the border units.