Note sulla versione di Aspose.PSD per Python via .NET 23.12

Chiave Sommario Categoria
PSDPYTHON-7 [Formato AI] Aggiunto supporto al rendering di immagini raster nella nuova versione di AI Funzionalità
PSDPYTHON-8 Gestione del tipo di gradiente Noise in GdflResrource Funzionalità
PSDPYTHON-9 Errore “Riferimento a un oggetto non impostato su un’istanza di un oggetto.” nel salvataggio del livello di testo dopo l’aggiornamento Bug
PSDPYTHON-10 Corregge il caricamento manuale dei font su MacOS utilizzando System.Drawing.Common e Aspose.Drawing. Bug
PSDPYTHON-11 AllowWarpRepaint in PsdLoadOptions porta all’eccezione Bug
PSDPYTHON-12 [Formato AI] Implementa il processo delle flussi di riferimento incrociato Miglioramento
PSDPYTHON-13 Il controllo della licenza per VectorPathDataResource funziona in modo non corretto Miglioramento

Cambiamenti nell’API pubblica

API Aggiunte:

  • M:Aspose.PSD.FileFormats.Psd.Layers.SmartObjects.SmartObjectLayer.#ctor(System.IO.Stream)
  • F:Aspose.PSD.FileFormats.Ai.AiFormatVersion.Pdf17
  • P:Aspose.PSD.FileFormats.Psd.Layers.FillSettings.NoiseGradientFillSettings.RndNumberSeed
  • P:Aspose.PSD.FileFormats.Psd.Layers.FillSettings.NoiseGradientFillSettings.ShowTransparency
  • P:Aspose.PSD.FileFormats.Psd.Layers.FillSettings.NoiseGradientFillSettings.UseVectorColor
  • P:Aspose.PSD.FileFormats.Psd.Layers.FillSettings.NoiseGradientFillSettings.Roughness
  • P:Aspose.PSD.FileFormats.Psd.Layers.FillSettings.NoiseGradientFillSettings.ColorModel
  • P:Aspose.PSD.FileFormats.Psd.Layers.FillSettings.NoiseGradientFillSettings.MinimumColor
  • P:Aspose.PSD.FileFormats.Psd.Layers.FillSettings.NoiseGradientFillSettings.MaximumColor
  • T:Aspose.PSD.FileFormats.Psd.Layers.Gradient.NoiseColorModel
  • F:Aspose.PSD.FileFormats.Psd.Layers.Gradient.NoiseColorModel.RGB
  • F:Aspose.PSD.FileFormats.Psd.Layers.Gradient.NoiseColorModel.HSB
  • F:Aspose.PSD.FileFormats.Psd.Layers.Gradient.NoiseColorModel.LAB
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.GdFlResource.GradientMode
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.GdFlResource.RndNumberSeed
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.GdFlResource.ShowTransparency
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.GdFlResource.UseVectorColor
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.GdFlResource.Roughness
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.GdFlResource.ColorModel
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.GdFlResource.MinimumColor
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.GdFlResource.MaximumColor
  • T:Aspose.PSD.FileFormats.Psd.Layers.FillSettings.BaseGradientFillSettings
  • M:Aspose.PSD.FileFormats.Psd.Layers.FillSettings.BaseGradientFillSettings.#ctor
  • P:Aspose.PSD.FileFormats.Psd.Layers.FillSettings.BaseGradientFillSettings.GradientType
  • P:Aspose.PSD.FileFormats.Psd.Layers.FillSettings.BaseGradientFillSettings.GradientName
  • P:Aspose.PSD.FileFormats.Psd.Layers.FillSettings.BaseGradientFillSettings.FillType
  • P:Aspose.PSD.FileFormats.Psd.Layers.FillSettings.BaseGradientFillSettings.Color
  • P:Aspose.PSD.FileFormats.Psd.Layers.FillSettings.BaseGradientFillSettings.AlignWithLayer
  • P:Aspose.PSD.FileFormats.Psd.Layers.FillSettings.BaseGradientFillSettings.Dither
  • P:Aspose.PSD.FileFormats.Psd.Layers.FillSettings.BaseGradientFillSettings.Reverse
  • P:Aspose.PSD.FileFormats.Psd.Layers.FillSettings.BaseGradientFillSettings.Angle
  • P:Aspose.PSD.FileFormats.Psd.Layers.FillSettings.BaseGradientFillSettings.HorizontalOffset
  • P:Aspose.PSD.FileFormats.Psd.Layers.FillSettings.BaseGradientFillSettings.VerticalOffset
  • P:Aspose.PSD.FileFormats.Psd.Layers.FillSettings.BaseGradientFillSettings.ColorPoints
  • P:Aspose.PSD.FileFormats.Psd.Layers.FillSettings.BaseGradientFillSettings.TransparencyPoints
  • P:Aspose.PSD.FileFormats.Psd.Layers.FillSettings.BaseGradientFillSettings.Scale
  • P:Aspose.PSD.FileFormats.Psd.Layers.FillSettings.BaseGradientFillSettings.GradientMode
  • P:Aspose.PSD.FileFormats.Psd.Layers.FillSettings.GradientFillSettings.Interpolation
  • P:Aspose.PSD.FileFormats.Psd.Layers.FillSettings.IGradientFillSettings.GradientMode
  • T:Aspose.PSD.FileFormats.Psd.Layers.FillSettings.NoiseGradientFillSettings
  • M:Aspose.PSD.FileFormats.Psd.Layers.FillSettings.NoiseGradientFillSettings.#ctor
  • T:Aspose.PSD.CustomFontHandler.CustomFontData
  • M:Aspose.PSD.Metered.GetProductName
  • M:Aspose.PSD.Metered.IsMeteredLicensed
  • T:Aspose.PSD.PluginLicenseException
  • M:Aspose.PSD.PluginLicenseException.#ctor
  • M:Aspose.PSD.Metered.Equals(System.Object)

API Rimosse:

  • M:Aspose.PSD.Xmp.Schemas.XmpBaseSchema.XmpBasicPackage.ContainsKey(System.String)
  • M:Aspose.PSD.Metered.Equals(System.Object)

Esempi di utilizzo:

PSDPYTHON-7. [Formato AI] Aggiungi supporto al rendering delle immagini raster nella nuova versione di AI

        sourceFile = "raster.ai"
        outputFile = "raster_output.png"

        with Image.load(sourceFile) as image:
            image.save(outputFile, PngOptions())mage.Save(outputFile, new PngOptions());

PSDPYTHON-8. Gestisci il tipo di gradiente Noise in GdflResrource

        # Esempio per lavorare con questo GdFlResource utilizzando l'API di base
        sourceFile = "Gradient-Fill.psd"
        destFile = "Gradient-Fill-out.psd"

        with Image.load(sourceFile, PsdLoadOptions()) as image:
            psdImage = cast(PsdImage, image)
            layer = psdImage.layers[1]

            for res in layer.resources:
                resource = as_of(res, GdFlResource)
                if (resource != None):
                    resource.scale = 90
                    resource.angle = 30
                    resource.dither = False
                    resource.align_with_layer = True
                    resource.reverse = False

                    break

            psdImage.save(destFile, PsdOptions())
		
		# Esempio per gestire un gradiente solido
		sourceFile = "ComplexGradientFillLayer.psd"
        outputFile =  "ComplexGradientFillLayer_output.psd"

        with Image.load(sourceFile) as image:
            im = cast(PsdImage, image)
            for layer in im.layers:
                if is_assignable(layer, FillLayer):
                    fillLayer = as_of(layer, FillLayer)
                    gradientFillSettings = fillLayer.fill_settings

                    # Lettura
                    
                    # Modifica
                    
                    im.save(outputFile)

        with Image.load(outputFile) as image:
            im = cast(PsdImage, image)
            for layer in im.layers:
                if isinstance(layer, FillLayer):
                    fillLayer = layer
                    gradientFillSettings = fillLayer.fill_settings

                    assert abs(gradientFillSettings.angle - 30) < 0.001
                    assert gradientFillSettings.align_with_layer == True
                    assert gradientFillSettings.dither == False
                    assert gradientFillSettings.reverse == True
                    assert gradientFillSettings.horizontal_offset == 25
                    assert gradientFillSettings.vertical_offset == -15

                    assert len(gradientFillSettings.transparency_points) == 4
                    assert len(gradientFillSettings.color_points) == 3
                    

PSDPYTHON-9. Errore “Riferimento a un oggetto non impostato su un’istanza di un oggetto.” durante il salvataggio del livello di testo dopo l’aggiornamento

        sourceFile = "input_1827.psd"
        outputFile = "out_1827.psd"

        with Image.load(sourceFile) as image:
            psdImage = cast(PsdImage, image)
            for layer in psdImage.layers:
                if (is_assignable(layer, TextLayer)):
                    textLayer = cast(TextLayer, layer)
                    textLayer.text_data.update_layer_data()

            # Non dovrebbe esserci alcun errore qui
            psdImage.save(outputFile)

PSDPYTHON-11. AllowWarpRepaint in PsdLoadOptions porta all’eccezione

            string sourceFile = @"SizeChart-4 Colors.psd";
            string outputFile = @"SizeChart-4 Colors.png";

            using (var psdImage = (PsdImage)Aspose.PSD.Image.Load(sourceFile, new PsdLoadOptions() { AllowWarpRepaint = true, LoadEffectsResource = true })) 
			{ 
				psdImage.Save(outputFile + "_original.png", new PngOptions()
				{
					ColorType = PngColorType.TruecolorWithAlpha,
					Progressive = true,
					CompressionLevel = 9
				});
			}

PSDPYTHON-13. Il controllo della licenza per VectorPathDataResource funziona in modo non corretto

        sourceFile = "DifferentLayerMasks.psd"
        outputFile = "DifferentLayerMasks_output.psd"

        with Image.load(sourceFile) as im:
            im.save(outputFile)