Aspose.PSD dla .NET 21.12 - Notatki dotyczące wersji
Contents
 [
      
        Hide
      ]
    
Ta strona zawiera notatki dotyczące wersji dla Aspose.PSD dla .NET 21.12
| Klucz | Podsumowanie | Kategoria | 
|---|---|---|
| PSDNET-997 | Dodano możliwość programowego ograniczania czcionek | Funkcja | 
| PSDNET-785 | Aspose.PSD 20.10: Nieudane ładowanie pliku PSD | Błąd | 
| PSDNET-812 | Wyjątek ImageLoad podczas ładowania pliku PSD | Błąd | 
| PSDNET-870 | Wyjątek ImageLoad podczas ładowania warstwy PSD z nieobsługiwaną metodą kompresji | Błąd | 
| PSDNET-918 | Aspose.PSD 21.6: Metoda kompresji nie jest obsługiwana dla pliku PSD | Błąd | 
| PSDNET-984 | Błędne zapisywanie ścieżki wektorowej z maską | Błąd | 
| PSDNET-1001 | Błędna czcionka w części tekstu w określonym pliku | Błąd | 
| PSDNET-1031 | Wyjątek nieobsługiwanej metody kompresji podczas ładowania obrazu | Błąd | 
| PSDNET-1033 | Indeks poza zakresem podczas zapisywania w określonym pliku | Błąd | 
| PSDNET-1036 | Dodano obsługę PathStructure w celu uniknięcia błędu ładowania pliku | Błąd | 
Zmiany w Publicznym API
Dodane API:
- 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
 
Usunięte API:
- Brak
 
Przykłady użycia:
PSDNET-785. Aspose.PSD 20.10: Nieudane ładowanie pliku 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. Wyjątek ImageLoad podczas ładowania pliku 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. Wyjątek ImageLoad podczas ładowania warstwy PSD z nieobsługiwaną metodą kompresji
            string srcFile = "sourceFile.psd";
            string output = "output.psd";
            using (PsdImage image = (PsdImage)Image.Load(srcFile))
            {
                image.Save(output);
            }
PSDNET-918. Aspose.PSD 21.6: Metoda kompresji nie jest obsługiwana dla pliku PSD
            string srcFile = "Fb-blue-jury (1).psd";
            string output = "output.psd";
            using (PsdImage image = (PsdImage)Image.Load(srcFile))
            {
                image.Save(output);
            }
PSDNET-984. Błędne zapisywanie ścieżki wektorowej z maską
            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. Dodano możliwość programowego ograniczania czcionek
            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. Błędna czcionka w części tekstu w określonym pliku
            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("Incorrect font");
                }
                // Powinniśmy otrzymać Myriad Pro, ale widzimy AdobeInvisFont
                image.Save(output, new PngOptions() { ColorType = PngColorType.TruecolorWithAlpha });
            }
PSDNET-1031. Wyjątek nieobsługiwanej metody kompresji podczas ładowania obrazu
            string srcFile = "shirt-error.psd";
            string output = "output.psd";
            using (PsdImage image = (PsdImage)Image.Load(srcFile))
            {
                image.Save(output);
            }
PSDNET-1033. Indeks poza zakresem podczas zapisywania w określonym pliku
            string srcFile = "237708.psd";
            string output = "output.png";
            using (PsdImage image = (PsdImage)Image.Load(srcFile))
            {
                image.Save(output, new PngOptions());
            }
PSDNET-1036. Dodano obsługę PathStructure w celu uniknięcia błędu ładowania pliku
            string srcFile = "shirt-color.psd";
            string output = "output.psd";
            using (PsdImage image = (PsdImage)Image.Load(srcFile))
            {
                image.Save(output);
            }