Notas da Versão Aspose.PSD para .NET 20.8
Contents
 [
      
        Hide
      ]
    
Esta página contém notas de lançamento para Aspose.PSD para .NET 20.8
| Chave | Resumo | Categoria | 
|---|---|---|
| PSDNET-390 | Suporte para PlLdResource (recurso de camada colocada para Camada de Objeto Inteligente) | Característica | 
| PSDNET-400 | Suporte para SoLdResource (recurso de dados de camada de Objeto Inteligente) | Característica | 
| PSDNET-693 | Adicionar suporte às estruturas de Array de Objeto e Array de Unidade: assinaturas ObAr / UnFl | Característica | 
| PSDNET-600 | Corrigir salvamento de imagem PSD modificada com Modo de Cor CMYK 16 bits por canal | Erro | 
| PSDNET-664 | Sublinhado e tachado perdidos após focar no texto em arquivo salvo com Aspose.PSD | Erro | 
| PSDNET-710 | Regressão: Aspose.PSD 20.7.0 quebra os tamanhos de fonte para arquivos mais antigos | Erro | 
Alterações na API Pública
APIs Adicionadas:
- M:Aspose.PSD.FileFormats.Psd.Layers.FillLayers.FillLayer.ReplaceNonTransparentColors(System.Int32)
 - M:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.ClassID.#ctor(System.Byte[],System.Boolean)
 - T:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.TypeToolInfoStructures.ObjectArrayStructure
 - M:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.TypeToolInfoStructures.ObjectArrayStructure.#ctor(System.String,System.String,Aspose.PSD.FileFormats.Psd.Layers.LayerResources.OSTypeStructure[])
 - M:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.TypeToolInfoStructures.ObjectArrayStructure.#ctor(System.Int32,Aspose.PSD.FileFormats.Psd.Layers.LayerResources.ClassID,Aspose.PSD.FileFormats.Psd.Layers.LayerResources.ClassID,System.String,Aspose.PSD.FileFormats.Psd.Layers.LayerResources.OSTypeStructure[])
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.TypeToolInfoStructures.ObjectArrayStructure.Key
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.TypeToolInfoStructures.ObjectArrayStructure.StructureCount
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.TypeToolInfoStructures.ObjectArrayStructure.ClassName
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.TypeToolInfoStructures.ObjectArrayStructure.ClassID
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.TypeToolInfoStructures.ObjectArrayStructure.Structures
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.TypeToolInfoStructures.ObjectArrayStructure.Length
 - F:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.TypeToolInfoStructures.ObjectArrayStructure.StructureKey
 - T:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.TypeToolInfoStructures.UnitArrayStructure
 - M:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.TypeToolInfoStructures.UnitArrayStructure.#ctor(Aspose.PSD.FileFormats.Psd.Layers.LayerResources.ClassID,Aspose.PSD.FileFormats.Psd.Layers.LayerResources.TypeToolInfoStructures.UnitTypes,System.Double[])
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.TypeToolInfoStructures.UnitArrayStructure.UnitType
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.TypeToolInfoStructures.UnitArrayStructure.Values
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.TypeToolInfoStructures.UnitArrayStructure.ValueCount
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.TypeToolInfoStructures.UnitArrayStructure.Key
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.TypeToolInfoStructures.UnitArrayStructure.Length
 - F:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.TypeToolInfoStructures.UnitArrayStructure.StructureKey
 - T:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource
 - M:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.#ctor(System.Guid,System.Boolean)
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.Version
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.UniqueId
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.IsCustom
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.PageNumber
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.TotalPages
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.AntiAliasPolicy
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.PlacedLayerType
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.Left
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.Top
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.Right
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.Bottom
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.Bounds
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.TransformMatrix
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.HorizontalMeshPoints
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.VerticalMeshPoints
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.HorizontalMeshPointUnit
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.VerticalMeshPointUnit
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.Signature
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.Key
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.Length
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.PsdVersion
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.Value
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.Perspective
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.PerspectiveOther
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.UOrder
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.VOrder
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.Items
 - M:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.Save(Aspose.PSD.StreamContainer,System.Int32)
 - F:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlLdResource.TypeToolKey
 - T:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlacedLayerType
 - F:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlacedLayerType.Unknown
 - F:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlacedLayerType.Vector
 - F:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlacedLayerType.Raster
 - F:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PlacedLayerType.ImageStack
 - T:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.IPlacedLayerResource
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.IPlacedLayerResource.Version
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.IPlacedLayerResource.UniqueId
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.IPlacedLayerResource.IsCustom
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.IPlacedLayerResource.PageNumber
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.IPlacedLayerResource.TotalPages
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.IPlacedLayerResource.AntiAliasPolicy
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.IPlacedLayerResource.PlacedLayerType
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.IPlacedLayerResource.Left
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.IPlacedLayerResource.Top
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.IPlacedLayerResource.Right
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.IPlacedLayerResource.Bottom
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.IPlacedLayerResource.Bounds
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.IPlacedLayerResource.TransformMatrix
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.IPlacedLayerResource.HorizontalMeshPoints
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.IPlacedLayerResource.VerticalMeshPoints
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.IPlacedLayerResource.HorizontalMeshPointUnit
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.IPlacedLayerResource.VerticalMeshPointUnit
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.IPlacedLayerResource.Value
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.IPlacedLayerResource.Perspective
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.IPlacedLayerResource.PerspectiveOther
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.IPlacedLayerResource.UOrder
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.IPlacedLayerResource.VOrder
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.IPlacedLayerResource.Items
 - T:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource
 - M:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.#ctor(System.Guid,System.Boolean,System.Boolean)
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.CompId
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.OriginalCompId
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.Version
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.UniqueId
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.PlacedId
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.IsCustom
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.PageNumber
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.TotalPages
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.AntiAliasPolicy
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.PlacedLayerType
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.Left
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.Top
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.Right
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.Bottom
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.Bounds
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.TransformMatrix
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.NonAffineTransformMatrix
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.HorizontalMeshPoints
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.VerticalMeshPoints
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.HorizontalMeshPointUnit
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.VerticalMeshPointUnit
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.Signature
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.Key
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.Length
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.PsdVersion
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.Value
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.Perspective
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.PerspectiveOther
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.UOrder
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.VOrder
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.Items
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.Crop
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.FrameCount
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.Resolution
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.ResolutionUnit
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.Comp
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.Width
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.Height
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.FrameStepNumerator
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.FrameStepDenominator
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.DurationNumerator
 - P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.DurationDenominator
 - M:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.Save(Aspose.PSD.StreamContainer,System.Int32)
 - F:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.SoLdResource.TypeToolKey
 
PSDNET-693. Adicionar suporte às estruturas de Array de Objeto e Array de Unidade: assinaturas ObAr / UnFl
            void AssertAreEqual(object actual, object expected)
            {
                if (!object.Equals(actual, expected))
                {
                    throw new FormatException(string.Format("O valor atual {0} não é igual ao esperado {1}.", actual, expected));
                }
            }
            string dataDir = "PSDNET693_1\\";
            var sourceFilePath = dataDir + "LayeredSmartObjects8bit2.psd";
            using (PsdImage image = (PsdImage)Image.Load(sourceFilePath))
            {
                UnitArrayStructure verticalStructure = null;
                foreach (Layer imageLayer in image.Layers)
                {
                    foreach (var imageResource in imageLayer.Resources)
                    {
                        var resource = imageResource as PlLdResource;
                        if (resource != null && resource.IsCustom)
                        {
                            foreach (OSTypeStructure structure in resource.Items)
                            {
                                if (structure.KeyName.ClassName == "customEnvelopeWarp")
                                {
                                    AssertAreEqual(typeof(DescriptorStructure), structure.GetType());
                                    var custom = (DescriptorStructure)structure;
                                    AssertAreEqual(custom.Structures.Length, 1);
                                    var mesh = custom.Structures[0];
                                    AssertAreEqual(typeof(ObjectArrayStructure), mesh.GetType());
                                    var meshObjectArray = (ObjectArrayStructure)mesh;
                                    AssertAreEqual(meshObjectArray.Structures.Length, 2);
                                    var vertical = meshObjectArray.Structures[1];
                                    AssertAreEqual(typeof(UnitArrayStructure), vertical.GetType());
                                    verticalStructure = (UnitArrayStructure)vertical;
                                    AssertAreEqual(verticalStructure.UnitType, UnitTypes.Pixels);
                                    AssertAreEqual(verticalStructure.ValueCount, 16);
                                    break;
                                }
                            }
                        }
                    }
                }
                AssertAreEqual(true, verticalStructure != null);
            }
           using (PsdImage image = (PsdImage)Image.Load("cub16bit_cmyk.psd"))
            {
                RasterCachedImage raster = image.Layers[0];
                Aspose.PSD.Graphics graphics = new Graphics(raster);
                int width = raster.Width;
                int height = raster.Height;
                Rectangle rect = new Rectangle(width / 3, height / 3, width - (2 * (width / 3)) - 1, height - (2 * (height / 3)) - 1);
                graphics.DrawRectangle(new Aspose.PSD.Pen(Color.DarkGray, 1),  rect);
                image.Save("output.png", new PngOptions());
            }
            string sourceFile = "source.psd";
            string outputFile = "output.psd";
            using (var image = (PsdImage)Image.Load(sourceFile))
            {
                var layers = image.Layers;
                var textLayer = (TextLayer)layers[1];
                textLayer.TextData.Items[0].Style.Underline = true;
                textLayer.TextData.Items[1].Style.Strikethrough = true;
                textLayer.TextData.UpdateLayerData();
                image.Save(outputFile, new PsdOptions(image));
            }
            string srcFile = "font_size_lost.psd";
            string outputFilePng = "output.png";
            using (var psdImage = (PsdImage)Image.Load(srcFile))
            {
                var textLayer = (TextLayer)psdImage.Layers[0];
                textLayer.TextData.UpdateLayerData();
                psdImage.Save(outputFilePng, new PngOptions());
            }