BorderInformationResource.MinimalVersion

BorderInformationResource.MinimalVersion property

Får den minsta nödvändiga PSD-versionen.

public override int MinimalVersion { get; }

Fastighetsvärde

Den minimala PSD-versionen.

Exempel

Följande exempel visar stödet för BorderInformationResource-resursen.

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

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

    image.Save(outputFilePath);
}

Se även