BackgroundColorResource.Color
BackgroundColorResource.Color property
Ottiene o imposta il colore di sfondo.
public Color Color { get; set; }
Esempi
L’esempio seguente dimostra il supporto della risorsa BackgroundColorResource.
[C#]
string sourceFilePath = "input.psd";
string outputFilePath = "output.psd";
using (var image = (PsdImage)Image.Load(sourceFilePath))
{
ResourceBlock[] imageResources = image.ImageResources;
BackgroundColorResource backgroundColorResource = null;
foreach (var imageResource in imageResources)
{
if (imageResource is BackgroundColorResource)
{
backgroundColorResource = (BackgroundColorResource)imageResource;
break;
}
}
// aggiorna BackgroundColorResource
backgroundColorResource.Color = Color.DarkRed;
image.Save(outputFilePath);
}
Guarda anche
- struct Color
- class BackgroundColorResource
- spazio dei nomi Aspose.PSD.FileFormats.Psd.Resources
- assemblea Aspose.PSD