Note sulla versione di Aspose.PSD per .NET 23.11
Contents
[
Hide
]
Questa pagina contiene le note sulla versione di Aspose.PSD per .NET 23.11
Chiave | Riassunto | Categoria |
---|---|---|
PSDNET-412 | Supporto di LMskResource | Funzionalità |
PSDNET-1669 | [Formato AI] Aggiunta della capacità di visualizzare file AI basati su PDF con Aspose.PSD | Funzionalità |
PSDNET-1702 | [Formato AI] Aggiunta del supporto per l’operatore PostScript “cm” | Funzionalità |
PSDNET-1752 | Aggiunta nuovi tipi di trasformazione: Onda, conchiglia su, conchiglia giù | Funzionalità |
PSDNET-1797 | Aggiunto supporto per la trasformazione verticale | Funzionalità |
PSDNET-1756 | System.ArgumentNullException: ‘Il valore non può essere nullo. (Parametro ‘chiave’)’ durante la chiamata a TextLayer.GetFonts() | Bug |
Cambiamenti nell’API pubblica
API Aggiunte:
- M:Aspose.PSD.FontSettings.RemoveFontCacheFile
- T:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.LmskResource
- M:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.LmskResource.#ctor
- P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.LmskResource.Signature
- P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.LmskResource.Key
- P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.LmskResource.Length
- P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.LmskResource.PsdVersion
- P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.LmskResource.ColorSpace
- P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.LmskResource.ColorComponent1
- P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.LmskResource.ColorComponent2
- P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.LmskResource.ColorComponent3
- P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.LmskResource.ColorComponent4
- P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.LmskResource.Opacity
- P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.LmskResource.Flag
- M:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.LmskResource.Save(Aspose.PSD.StreamContainer,System.Int32)
- F:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.LmskResource.TypeToolKey
- T:Aspose.PSD.FileFormats.Psd.Resources.Enums.ColorSpace
- F:Aspose.PSD.FileFormats.Psd.Resources.Enums.ColorSpace.RGB
- F:Aspose.PSD.FileFormats.Psd.Resources.Enums.ColorSpace.HSB
- F:Aspose.PSD.FileFormats.Psd.Resources.Enums.ColorSpace.CMYK
- F:Aspose.PSD.FileFormats.Psd.Resources.Enums.ColorSpace.Lab
- F:Aspose.PSD.FileFormats.Psd.Resources.Enums.ColorSpace.GrayScale
API Rimosse:
- Nessuna
Esempi di utilizzo:
PSDNET-412. Supporto di LMskResource
string sourceFile = Path.Combine(baseFolder, "sourceFile.psd");
string outputPsd = Path.Combine(outputFolder, "sourceFile_output.psd");
void AssertAreEqual(object expected, object actual)
{
if (!object.Equals(expected, actual))
{
throw new Exception("Gli oggetti non sono uguali.");
}
}
// Carica l'immagine a 16 bit.
using (PsdImage image = (PsdImage)Image.Load(sourceFile))
{
// Trova LMskResource.
LmskResource lmskResource = new LmskResource();
foreach (var res in image.GlobalLayerResources)
{
if (res is LmskResource)
{
lmskResource = (LmskResource)res;
break;
}
}
// Controlla le proprietà di LMskResource.
AssertAreEqual(lmskResource.ColorSpace, PSD.FileFormats.Psd.Resources.Enums.ColorSpace.RGB);
AssertAreEqual(lmskResource.ColorComponent1, (ushort)65535);
AssertAreEqual(lmskResource.ColorComponent2, (ushort)0);
AssertAreEqual(lmskResource.ColorComponent3, (ushort)0);
AssertAreEqual(lmskResource.ColorComponent4, (ushort)0);
AssertAreEqual(lmskResource.Opacity, (short)45);
AssertAreEqual(lmskResource.Flag, (byte)128);
// Modifica le proprietà di LMskResource.
lmskResource.ColorSpace = PSD.FileFormats.Psd.Resources.Enums.ColorSpace.HSB;
lmskResource.ColorComponent1 = 7854;
lmskResource.ColorComponent2 = 10;
lmskResource.ColorComponent3 = 15484;
lmskResource.Opacity = 85;
// Salva l'immagine.
image.Save(outputPsd);
}
PSDNET-1669. [Formato AI] Aggiunta della capacità di visualizzare file AI basati su PDF con Aspose.PSD
string sourceFile = Path.Combine(baseFolder, "ai_one.ai");
string outputPng = Path.Combine(outputFolder, "ai_one_output.png");
// Carica l'immagine AI basata su PDF.
using (AiImage image = (AiImage)Image.Load(sourceFile))
{
// Salva l'immagine AI come immagine PNG.
image.Save(outputPng, new PngOptions());
}
PSDNET-1702. [Formato AI] Aggiunta del supporto per l’operatore PostScript “cm”
string sourceFile = Path.Combine(baseFolder, "ai_two.ai");
string outputPng = Path.Combine(outputFolder, "ai_two_output.png");
// Carica l'immagine AI.
using (AiImage image = (AiImage)Image.Load(sourceFile))
{
// Salva l'immagine AI come immagine PNG.
image.Save(outputPng, new PngOptions());
}
PSDNET-1752. Aggiunta nuovi tipi di trasformazione: Onda, conchiglia su, conchiglia giù
var loadOptions = new PsdLoadOptions() { AllowWarpRepaint = true, LoadEffectsResource = true };
var saveOptions = new PngOptions { ColorType = PngColorType.TruecolorWithAlpha };
string sourceFileFish = Path.Combine(baseFolder, "1752_warp_fish.psd");
string sourceFileRise = Path.Combine(baseFolder, "1752_warp_rise.psd");
string sourceFileWave = Path.Combine(baseFolder, "1752_warp_wave.psd");
string outputFileFish = Path.Combine(outputFolder, "1752_output_fish.png");
string outputFileRise = Path.Combine(outputFolder, "1752_output_rise.png");
string outputFileWave = Path.Combine(outputFolder, "1752_output_wave.png");
using (var psdImage = (PsdImage)Image.Load(sourceFileFish, loadOptions))
{
psdImage.Save(outputFileFish, saveOptions);
}
using (var psdImage = (PsdImage)Image.Load(sourceFileRise, loadOptions))
{
psdImage.Save(outputFileRise, saveOptions);
}
using (var psdImage = (PsdImage)Image.Load(sourceFileWave, loadOptions))
{
psdImage.Save(outputFileWave, saveOptions);
}
PSDNET-1756. System.ArgumentNullException: ‘Il valore non può essere nullo. (Parametro ‘chiave’)’ durante la chiamata a TextLayer.GetFonts()
string src = Path.Combine(baseFolder, "SimpleText.psd");
FontSettings.RemoveFontCacheFile();
using (var psdImage = (PsdImage)Image.Load(src))
{
foreach (var layer in psdImage.Layers)
{
if (layer is TextLayer textLayer)
{
textLayer.GetFonts();
}
}
}
PSDNET-1797. Aggiunto supporto per la trasformazione verticale
var loadOptions = new PsdLoadOptions() { AllowWarpRepaint = true, LoadEffectsResource = true };
var saveOptions = new PngOptions { ColorType = PngColorType.TruecolorWithAlpha };
string sourceFileArcLower = Path.Combine(baseFolder, "1797_warp_arc_lower_v.psd");
string sourceFileArcUpper = Path.Combine(baseFolder, "1797_warp_arc_upper_v.psd");
string sourceFileArch = Path.Combine(baseFolder, "1797_warp_arch_v.psd");
string sourceFileBulge = Path.Combine(baseFolder, "1797_warp_bulge_v.psd");
string sourceFileFlag = Path.Combine(baseFolder, "1797_warp_flag_v.psd");
string sourceFileFish = Path.Combine(baseFolder, "1797_warp_fish_v.psd");
string sourceFileRise = Path.Combine(baseFolder, "1797_warp_rise_v.psd");
string sourceFileWave = Path.Combine(baseFolder, "1797_warp_wave_v.psd");
string outputFileArcLower = Path.Combine(outputFolder, "1797_warp_arc_lower_v.png");
string outputFileArcUpper = Path.Combine(outputFolder, "1797_warp_arc_upper_v.png");
string outputFileArch = Path.Combine(outputFolder, "1797_warp_arch_v.png");
string outputFileBulge = Path.Combine(outputFolder, "1797_warp_bulge_v.png");
string outputFileFlag = Path.Combine(outputFolder, "1797_warp_flag_v.png");
string outputFileFish = Path.Combine(outputFolder, "1797_output_fish_v.png");
string outputFileRise = Path.Combine(outputFolder, "1797_output_rise_v.png");
string outputFileWave = Path.Combine(outputFolder, "1797_output_wave_v.png");
using (var psdImage = (PsdImage)Image.Load(sourceFileArcLower, loadOptions)) { psdImage.Save(outputFileArcLower, saveOptions); }
using (var psdImage = (PsdImage)Image.Load(sourceFileArcUpper, loadOptions)) { psdImage.Save(outputFileArcUpper, saveOptions); }
using (var psdImage = (PsdImage)Image.Load(sourceFileArch, loadOptions)) { psdImage.Save(outputFileArch, saveOptions); }
using (var psdImage = (PsdImage)Image.Load(sourceFileBulge, loadOptions)) { psdImage.Save(outputFileBulge, saveOptions); }
using (var psdImage = (PsdImage)Image.Load(sourceFileFlag, loadOptions)) { psdImage.Save(outputFileFlag, saveOptions); }
using (var psdImage = (PsdImage)Image.Load(sourceFileFish, loadOptions)) { psdImage.Save(outputFileFish, saveOptions); }
using (var psdImage = (PsdImage)Image.Load(sourceFileRise, loadOptions)) { psdImage.Save(outputFileRise, saveOptions); }
using (var psdImage = (PsdImage)Image.Load(sourceFileWave, loadOptions)) { psdImage.Save(outputFileWave, saveOptions); }