Note sulla versione di Aspose.PSD per .NET 23.1

Chiave Sommario Categoria
PSDNET-401 Supporto di vstkResource Feature
PSDNET-1346 Aggiunta della proprietà BaselineDirection/IsStandardVerticalRomanAlignmentEnabled modificabile nell’interfaccia IText Feature
PSDNET-181 PSD non viene convertito correttamente in JPEG Bug
PSDNET-958 PSB in PDF non riesce per file di grandi dimensioni Bug
PSDNET-1171 Aggiunta dell’elaborazione del mascheramento di ritaglio al livello di regolazione Bug
PSDNET-1252 Dopo il ridimensionamento dell’immagine intera e poi dopo il ridimensionamento del layer specifico Aspose.PSD solleva un’eccezione durante il salvataggio del layer Bug

Cambiamenti nell’API pubblica

API aggiunte:

  • P:Aspose.PSD.FileFormats.Psd.Layers.Text.ITextStyle.IsStandardVerticalRomanAlignmentEnabled
  • T:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.LineCapType
  • F:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.LineCapType.RoundCap
  • F:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.LineCapType.SquareCap
  • F:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.LineCapType.ButtCap
  • T:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.LineJoinType
  • F:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.LineJoinType.BevelJoin
  • F:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.LineJoinType.RoundJoin
  • F:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.LineJoinType.MiterJoin
  • T:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.VstkResource
  • M:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.VstkResource.#ctor
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.VstkResource.Signature
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.VstkResource.Key
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.VstkResource.Length
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.VstkResource.PsdVersion
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.VstkResource.StrokeStyleVersion
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.VstkResource.StrokeEnabled
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.VstkResource.FillEnabled
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.VstkResource.StrokeStyleLineDashOffset
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.VstkResource.StrokeStyleMiterLimit
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.VstkResource.StrokeStyleLineCapType
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.VstkResource.StrokeStyleLineCapWidth
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.VstkResource.StrokeStyleLineWidth
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.VstkResource.StrokeStyleLineJoinType
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.VstkResource.StrokeStyleLineAlignment
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.VstkResource.StrokeStyleScaleLock
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.VstkResource.StrokeStyleStrokeAdjust
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.VstkResource.StrokeStyleBlendMode
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.VstkResource.StrokeStyleOpacity
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.VstkResource.StrokeStyleResolution
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.VstkResource.StrokeStyleContent
  • M:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.VstkResource.Save(Aspose.PSD.StreamContainer,System.Int32)
  • F:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.VstkResource.TypeToolKey
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.StrokeResources.VstkResource.StrokeStyleLineDashSet
  • T:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PostResource
  • M:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PostResource.#ctor
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PostResource.Levels
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PostResource.Signature
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PostResource.Key
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PostResource.Length
  • P:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PostResource.PsdVersion
  • M:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PostResource.Save(Aspose.PSD.StreamContainer,System.Int32)
  • F:Aspose.PSD.FileFormats.Psd.Layers.LayerResources.PostResource.TypeToolKey

API rimosse:

  • Nessuna

Esempi di utilizzo:

PSDNET-181. PSD non viene convertito correttamente in JPEG

string srcFile = "elicottero.psd";
string outputJpg = "output.jpg";

using (var psdImage = (PsdImage)Image.Load(srcFile))
{
    psdImage.Save(outputJpg , new JpegOptions());
}

PSDNET-401. Supporto di vstkResource

string srcFile = "StrokeShapeTest1.psd";
string dstFile = "StrokeShapeTest2.psd";

using (PsdImage image = (PsdImage)Image.Load(srcFile))
{
    Layer layer = image.Layers[1];
    foreach (LayerResource resource in layer.Resources)
    {
        if (resource is VstkResource)
        {
            VstkResource vstkResource = (VstkResource)resource;
            vstkResource.StrokeStyleLineAlignment = StrokePosition.Outside;
            vstkResource.StrokeStyleLineWidth = 20;
        }
    }

    image.Save(dstFile);
}

PSDNET-958. PSB in PDF non riesce per file di grandi dimensioni

string inputPath = "SteveKohli-CarTOP.psb";
string outputPath ="output.pdf";

using (var image = Image.Load(inputPath))
{
    image.Save(outputPath, new PdfOptions());
}

PSDNET-1171. Aggiunta dell’elaborazione del mascheramento di ritaglio al livello di regolazione

string srcFile = "elicottero_parte.psd";
string outputJpg = "output.jpg";

using (var psdImage = (PsdImage)Image.Load(srcFile))
{
    psdImage.Save(outputJpg , new JpegOptions());
}

PSDNET-1252. Dopo il ridimensionamento dell’immagine intera e poi dopo il ridimensionamento del layer specifico Aspose.PSD solleva un’eccezione durante il salvataggio del layer

string sourceFile = "file_sorgente.psd";
string imgFile1 = "img1.png";
string imgFile2 = "img2.png";

var loadOptions = new PsdLoadOptions()
{
    ReadOnlyMode = false,
    LoadEffectsResource = true
};

using (var image = (PsdImage)Image.Load(sourceFile, loadOptions))
{
    // Prima ridimensioniamo l'immagine intera
    image.Resize(110, 90);
    var layers = image.Layers;

    var layerOk = layers[0];
    layerOk.Resize(100, 80);

    var layerException = layers[1];
    layerException.Resize(100, 80);

    // Qui tutto funzionerà correttamente
    layerOk.Save(imgFile1, new PngOptions() { ColorType = PngColorType.TruecolorWithAlpha });

    // Ora qui tutto funzionerà correttamente
    layerException.Save(imgFile2, new PngOptions() { ColorType = PngColorType.TruecolorWithAlpha });                
}

PSDNET-1346. Aggiunta della proprietà BaselineDirection/IsStandardVerticalRomanAlignmentEnabled modificabile nell’interfaccia IText

// Il codice seguente dimostra la possibilità di modificare la nuova proprietà IsStandardVerticalRomanAlignmentEnabled.
// Al momento ciò non influisce sul rendering, ma consente solo di modificare il valore della proprietà.

string src = "1346test.psd";
string output = "out_1346test.psd";

using (var image = (PsdImage)Image.Load(src))
{
    var textLayer = image.Layers[1] as TextLayer;
    var textPortion = textLayer.TextData.Items[0];
    if (textPortion.Style.IsStandardVerticalRomanAlignmentEnabled)
    {
        // Corretta lettura
    }
    else
    {
        throw new Exception("Lettura incorretta del valore della proprietà IsStandardVerticalRomanAlignmentEnabled");
    }

    textPortion.Style.IsStandardVerticalRomanAlignmentEnabled = false;
    textLayer.TextData.UpdateLayerData();

    image.Save(output);
}

using (var image = (PsdImage)Image.Load(output))
{
    var textLayer = image.Layers[1] as TextLayer;
    var textPortion = textLayer.TextData.Items[0];
    if (!textPortion.Style.IsStandardVerticalRomanAlignmentEnabled)
    {
        // Corretta lettura
    }
    else
    {
        throw new Exception("Lettura incorretta del valore della proprietà IsStandardVerticalRomanAlignmentEnabled");
    }
}