BorderInformationResource.DataSize

BorderInformationResource.DataSize property

Mendapatkan ukuran data sumber daya dalam byte.

public override int DataSize { get; }

Nilai properti

Ukuran data sumber daya.

Contoh

Contoh berikut menunjukkan dukungan sumber daya BorderInformationResource.

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

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

    image.Save(outputFilePath);
}

Lihat juga