BorderInformationResource.Width

BorderInformationResource.Width property

Kenarlık genişliğini alır veya ayarlar.

public double Width { get; set; }

Örnekler

Aşağıdaki örnek, BorderInformationResource kaynağının desteğini göstermektedir.

[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;
        }
    }

    // BorderInformationResource'u güncelle
    borderInfoResource.Width = 0.1;
    borderInfoResource.Unit = PhysicalUnit.Inches;

    image.Save(outputFilePath);
}

Ayrıca bakınız