Notas de la versión Aspose.PSD para .NET 21.12
Contents
 [
      
        Hide
      ]
    
Esta página contiene las notas de la versión de Aspose.PSD para .NET 21.12
| Clave | Resumen | Categoría | 
|---|---|---|
| PSDNET-997 | Agregar capacidad para limitar fuentes programáticamente | Característica | 
| PSDNET-785 | Aspose.PSD 20.10: Error al cargar PSD | Error | 
| PSDNET-812 | Excepción ImageLoad al cargar PSD | Error | 
| PSDNET-870 | Excepción ImageLoad al cargar capa PSD con CompressionMethod no compatible | Error | 
| PSDNET-918 | Aspose.PSD 21.6: El método de compresión no es compatible con un archivo PSD | Error | 
| PSDNET-984 | Guardado incorrecto de ruta vectorial con una máscara | Error | 
| PSDNET-1001 | Fuente incorrecta en la porción de texto en un archivo específico | Error | 
| PSDNET-1031 | Excepción de método de compresión no compatible al cargar imagen | Error | 
| PSDNET-1033 | Índice fuera de rango al guardar en el archivo específico | Error | 
| PSDNET-1036 | Agregar soporte de PathStructure para evitar el error al cargar el archivo | Error | 
Cambios en la API pública
APIs agregadas:
- T:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.TypeToolInfoStructures.PathStructure
- M:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.TypeToolInfoStructures.PathStructure.#ctor(Aspose.PSD.FileFormats.Psd.Layers.LayerResources.ClassID)
- P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.TypeToolInfoStructures.PathStructure.Key
- P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.TypeToolInfoStructures.PathStructure.Prefix
- P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.TypeToolInfoStructures.PathStructure.Path
- P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.TypeToolInfoStructures.PathStructure.Length
- F:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.TypeToolInfoStructures.PathStructure.StructureKey
- M:Aspose.PSD.FontSettings.SetAllowedFonts(System.String[])
- M:Aspose.PSD.FontSettings.IsFontAllowed(System.String)
- M:Aspose.PSD.FontSettings.GetReplacementFont(System.String)
- M:Aspose.PSD.FontSettings.GetFontReplacements(System.String)
- M:Aspose.PSD.FontSettings.SetFontReplacements(System.String,System.String[])
- M:Aspose.PSD.FontSettings.ClearFontReplacements
APIs eliminadas:
- Ninguna
Ejemplos de uso:
PSDNET-785. Aspose.PSD 20.10: Error al cargar PSD
            string src = "ShimadzuLetterhead100.psd";
            string output = "output.psd";
            using (var img = (PsdImage)Image.Load(src, new PsdLoadOptions() { ReadOnlyMode = true }))
            {
                img.Save(output);
            }
PSDNET-812. Excepción ImageLoad al cargar PSD
            string src = "5-MX10600_Amazon_DEVICES_2_1000x1000.psd";
            string output = "output.psd";
            using (var img = (PsdImage)Image.Load(src))
            {
                img.Save(output);
            }
PSDNET-870. Excepción ImageLoad al cargar capa PSD con CompressionMethod no compatible
            string srcFile = "sourceFile.psd";
            string output = "output.psd";
            using (PsdImage image = (PsdImage)Image.Load(srcFile))
            {
                image.Save(output);
            }
PSDNET-918. Aspose.PSD 21.6: El método de compresión no es compatible con un archivo PSD
            string srcFile = "Fb-blue-jury (1).psd";
            string output = "output.psd";
            using (PsdImage image = (PsdImage)Image.Load(srcFile))
            {
                image.Save(output);
            }
PSDNET-984. Guardado incorrecto de ruta vectorial con una máscara
            string srcFile = "PsdConvertToPngExample.psd";
            string outputFilePng = "output.png";
            using (var psdImage = (PsdImage)Image.Load(srcFile, new PsdLoadOptions() { LoadEffectsResource = true }))
            {
                psdImage.Save(
                    outputFilePng,
                    new PngOptions() { ColorType = PngColorType.TruecolorWithAlpha, Progressive = true, CompressionLevel = 9 });
            }
PSDNET-997. Agregar capacidad para limitar fuentes programáticamente
            string srcFile = "fonts_com_updated.psd";
            string output = "etalon_fonts_com_updated.psd.png";
            try
            {
                var fontList = new string[] { "Courier New", "Webdings", "Bookman Old Style" };
                FontSettings.SetAllowedFonts(fontList);
                var myriadReplacement = new string[] { "Courier New", "Webdings", "Bookman Old Style" };
                var calibriReplacement = new string[] { "Webdings", "Courier New", "Bookman Old Style" };
                var arialReplacement = new string[] { "Bookman Old Style", "Courier New", "Webdings" };
                var timesReplacement = new string[] { "Arial", "NotExistedFont", "Courier New" };
                FontSettings.SetFontReplacements("MyriadPro-Regular", myriadReplacement);
                FontSettings.SetFontReplacements("Calibri", calibriReplacement);
                FontSettings.SetFontReplacements("Arial", arialReplacement);
                FontSettings.SetFontReplacements("Times New Roman", timesReplacement);
                using (PsdImage image = (PsdImage)Image.Load(srcFile))
                {
                    image.Save(output, new PngOptions() { ColorType = PngColorType.TruecolorWithAlpha });
                }
            } 
            finally
            {
                FontSettings.SetAllowedFonts(null);
                FontSettings.ClearFontReplacements();
            }
PSDNET-1001. Fuente incorrecta en la porción de texto en un archivo específico
            string srcFile = "fonts_com.psd";
            string output = "output.png";
            using (PsdImage image = (PsdImage)Image.Load(srcFile))
            {
                var tl = (TextLayer)image.Layers[1];
                var fontName = tl.TextData.Items[0].Style.FontName;
                if (fontName != "MyriadPro-Regular")
                {
                    throw new Exception("Fuente incorrecta");
                }
                // Deberíamos obtener Myriad Pro, pero vemos AdobeInvisFont
                image.Save(output, new PngOptions() { ColorType = PngColorType.TruecolorWithAlpha });
            }
PSDNET-1031. Excepción de método de compresión no compatible al cargar imagen
            string srcFile = "shirt-error.psd";
            string output = "output.psd";
            using (PsdImage image = (PsdImage)Image.Load(srcFile))
            {
                image.Save(output);
            }
PSDNET-1033. Índice fuera de rango al guardar en el archivo específico
            string srcFile = "237708.psd";
            string output = "output.png";
            using (PsdImage image = (PsdImage)Image.Load(srcFile))
            {
                image.Save(output, new PngOptions());
            }
PSDNET-1036. Agregar soporte de PathStructure para evitar el error de carga del archivo
            string srcFile = "shirt-color.psd";
            string output = "output.psd";
            using (PsdImage image = (PsdImage)Image.Load(srcFile))
            {
                image.Save(output);
            }