BorderInformationResource.Unit
BorderInformationResource.Unit property
Hämtar eller ställer in gränsenheterna.
public PhysicalUnit Unit { get; set; }
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
- enum PhysicalUnit
- class BorderInformationResource
- namnutrymme Aspose.PSD.FileFormats.Psd.Resources
- hopsättning Aspose.PSD