VibAResource.Save
VibAResource.Save method
Menyimpan sumber daya ke wadah aliran yang ditentukan.
public override void Save(StreamContainer streamContainer, int psdVersion)
Parameter | Jenis | Keterangan |
---|---|---|
streamContainer | StreamContainer | Wadah aliran untuk menyimpan. |
psdVersion | Int32 | Versi PSD. |
Contoh
Contoh kode berikut menunjukkan dukungan sumber daya VibAResource.
[C#]
// Contoh dukungan membaca dan menulis Sumber Daya Getaran saat runtime.
string sourceFileName = "VibranceResource.psd";
string outputFileName = "out_VibranceResource.psd";
using (PsdImage image = (PsdImage)Image.Load(sourceFileName))
{
foreach (var layer in image.Layers)
{
foreach (var resource in layer.Resources)
{
if (resource is VibAResource)
{
var vibranceResource = (VibAResource)resource;
int vibranceValue = vibranceResource.Vibrance;
int saturationValue = vibranceResource.Saturation;
vibranceResource.Vibrance = vibranceValue * 2;
vibranceResource.Saturation = saturationValue * 2;
break;
}
}
}
image.Save(outputFileName);
}
Lihat juga
- class StreamContainer
- class VibAResource
- ruang nama Aspose.PSD.FileFormats.Psd.Layers.LayerResources
- perakitan Aspose.PSD