BorderInformationResource.Unit
BorderInformationResource.Unit property
Mendapat atau mengatur unit perbatasan.
public PhysicalUnit Unit { get; set; }
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
- enum PhysicalUnit
- class BorderInformationResource
- ruang nama Aspose.PSD.FileFormats.Psd.Resources
- perakitan Aspose.PSD