Catatan Rilis Aspose.PSD untuk .NET 23.6
Contents
[
Hide
]
Halaman ini berisi catatan rilis untuk Aspose.PSD untuk .NET 23.6
Kunci | Ringkasan | Kategori |
---|---|---|
PSDNET-1401 | Refaktor API TimeLine | Peningkatan |
PSDNET-1517 | Hapus artefak saat merender warp | Peningkatan |
PSDNET-1528 | Optimisasi merender warp | Peningkatan |
PSDNET-147 | Dukungan untuk Lapisan Penyesuaian Ambang | Fitur |
PSDNET-149 | Dukungan untuk Lapisan Penyesuaian Warna Selective | Fitur |
PSDNET-801 | Kemampuan untuk mengekspor PSD TimeLine ke file Animated Gif | Fitur |
PSDNET-1555 | Tambahkan dukungan untuk TextLayer tanpa batas persegi | Fitur |
PSDNET-1582 | Dukungan untuk ShapeLayer | Fitur |
PSDNET-864 | Mengganti gambar dalam objek cerdas tidak memperbarui | Bug |
PSDNET-1404 | File PSD tidak dapat disimpan sebagai PSD dengan pengecualian berikut: Mode Rgb dan Lab tidak boleh mengandung kurang dari 3 saluran dan lebih dari 4 saluran | Bug |
PSDNET-1546 | Justifikasi Teks hilang jika membuka TextLayer dengan mode edit Photoshop | Bug |
PSDNET-1548 | Pengecualian referensi nol saat menyimpan file PSD | Bug |
PSDNET-1578 | Pengecualian saat memuat ShapeLayer: Poin untuk batas asal vektor belum didukung | Bug |
PSDNET-1579 | Pengecualian saat memuat VogkResource: Poin disimpan sebagai DoubleStructures, kami membacanya sebagai UnitStructures | Bug |
PSDNET-1581 | LayerType dari ShapeLayer kosong | Bug |
Perubahan pada API Publik
API Ditambahkan:
- Aspose.PSD.FileFormats.Psd.Layers.Animation.Frame.#ctor
- M:Aspose.PSD.FileFormats.Psd.Layers.Animation.LayerState.#ctor
- T:Aspose.PSD.FileFormats.Psd.Layers.Animation.Timeline
- M:Aspose.PSD.FileFormats.Psd.Layers.Animation.Timeline.#ctor
- P:Aspose.PSD.FileFormats.Psd.Layers.Animation.Timeline.AFSt
- P:Aspose.PSD.FileFormats.Psd.Layers.Animation.Timeline.FsID
- P:Aspose.PSD.FileFormats.Psd.Layers.Animation.Timeline.ActiveFrameIndex
- P:Aspose.PSD.FileFormats.Psd.Layers.Animation.Timeline.Frames
- P:Aspose.PSD.FileFormats.Psd.Layers.Animation.Timeline.LoopesCount
- M:Aspose.PSD.FileFormats.Psd.Layers.Animation.Timeline.Save(System.String,Aspose.PSD.ImageOptionsBase)
- M:Aspose.PSD.FileFormats.Psd.Layers.Animation.Timeline.Save(System.IO.Stream,Aspose.PSD.ImageOptionsBase)
- M:Aspose.PSD.FileFormats.Psd.Layers.Animation.Timeline.SwitchActiveFrame(System.Int32)
- P:Aspose.PSD.FileFormats.Psd.PsdImage.Timeline
- P:Aspose.PSD.FileFormats.Core.VectorPaths.VectorShapeBoundingBox.PointsUnitType
- T:Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.CmykCorrection
- M:Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.CmykCorrection.#ctor
- P:Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.CmykCorrection.Cyan
- P:Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.CmykCorrection.Magenta
- P:Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.CmykCorrection.Yellow
- P:Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.CmykCorrection.Black
- T:Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.CorrectionMethodTypes
- F:Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.CorrectionMethodTypes.Relative
- F:Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.CorrectionMethodTypes.Absolute
- T:Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.SelectiveColorsTypes
- F:Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.SelectiveColorsTypes.Reds
- F:Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.SelectiveColorsTypes.Yellows
- F:Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.SelectiveColorsTypes.Greens
- F:Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.SelectiveColorsTypes.Cyans
- F:Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.SelectiveColorsTypes.Blues
- F:Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.SelectiveColorsTypes.Magentas
- F:Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.SelectiveColorsTypes.Whites
- F:Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.SelectiveColorsTypes.Neutrals
- F:Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.SelectiveColorsTypes.Blacks
- T:Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.SelectiveColorLayer
- P:Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.SelectiveColorLayer.Version
- P:Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.SelectiveColorLayer.CorrectionMethod
- M:Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.SelectiveColorLayer.GetCmykCorrection(Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.SelectiveColorsTypes)
- M:Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.SelectiveColorLayer.SetCmykCorrection(Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.SelectiveColorsTypes,Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.CmykCorrection)
- M:Aspose.PSD.FileFormats.Psd.PsdImage.AddSelectiveColorAdjustmentLayer
- T:Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.ThresholdLayer
- P:Aspose.PSD.FileFormats.Psd.Layers.AdjustmentLayers.ThresholdLayer.Level
- M:Aspose.PSD.FileFormats.Psd.PsdImage.AddThresholdAdjustmentLayer
- T:Aspose.PSD.FileFormats.Psd.Layers.ShapeLayer
- M:Aspose.PSD.FileFormats.Psd.Layers.ShapeLayer.#ctor
- M:Aspose.PSD.FileFormats.Psd.Layers.ShapeLayer.CreateInstance
- M:Aspose.PSD.FileFormats.Psd.Layers.ShapeLayer.Update
- P:Aspose.PSD.FileFormats.Psd.Layers.ShapeLayer.Path
API Dihapus:
- M:Aspose.PSD.FileFormats.Psd.Layers.Animation.Frame.#ctor(Aspose.PSD.FileFormats.Psd.Layers.Animation.TimeLine)
- M:Aspose.PSD.FileFormats.Psd.Layers.Animation.LayerState.#ctor(System.Int32)
- T:Aspose.PSD.FileFormats.Psd.Layers.Animation.TimeLine
- M:Aspose.PSD.FileFormats.Psd.Layers.Animation.TimeLine.#ctor
- P:Aspose.PSD.FileFormats.Psd.Layers.Animation.TimeLine.AFSt
- P:Aspose.PSD.FileFormats.Psd.Layers.Animation.TimeLine.FsID
- P:Aspose.PSD.FileFormats.Psd.Layers.Animation.TimeLine.ActiveFrame
- P:Aspose.PSD.FileFormats.Psd.Layers.Animation.TimeLine.LoopesCount
- P:Aspose.PSD.FileFormats.Psd.Layers.Animation.TimeLine.Frames
- P:Aspose.PSD.FileFormats.Psd.Layers.Animation.TimeLine.LayerIds
- M:Aspose.PSD.FileFormats.Psd.Layers.Animation.TimeLine.InitializeFrom(Aspose.PSD.FileFormats.Psd.PsdImage)
- M:Aspose.PSD.FileFormats.Psd.Layers.Animation.TimeLine.ApplyTo(Aspose.PSD.FileFormats.Psd.PsdImage)
Contoh Penggunaan:
PSDNET-147. Dukungan Lapisan Penyesuaian Ambang
string sourceFileWithThresholdLayer = "flowers_threshold_source.psd";
string outputPsdWithThresholdLayer = "flowers_threshold_output.psd";
string outputPngWithThresholdLayer = "flowers_threshold_output.png";
string sourceFileWithoutThresholdLayer = "flowers_source.psd";
string outputPsdWithoutThresholdLayer = "flowers_output.psd";
string outputPngWithoutThresholdLayer = "flowers_output.png";
void AssertAreEqual(object expected, object actual)
{
if (!object.Equals(expected, actual))
{
throw new Exception("Objek tidak sama.");
}
}
// Dapatkan, periksa, dan ubah lapisan penyesuaian Ambang dari gambar.
using (var image = (PsdImage)Image.Load(sourceFileWithThresholdLayer))
{
foreach (var layer in image.Layers)
{
if (layer is ThresholdLayer)
{
// Dapatkan lapisan penyesuaian Ambang.
ThresholdLayer thrsLayer = (ThresholdLayer)layer;
var level = thrsLayer.Level;
// Periksa parameter lapisan.
AssertAreEqual(level, (short)115);
// Atur parameter lapisan.
thrsLayer.Level = 50;
image.Save(outputPsdWithThresholdLayer);
image.Save(outputPngWithThresholdLayer, new PngOptions());
}
}
}
// Tambahkan dan atur lapisan penyesuaian Ambang ke gambar.
using (var image = (PsdImage)Image.Load(sourceFileWithoutThresholdLayer))
{
// Tambahkan lapisan Penyesuaian Ambang.
ThresholdLayer thresholdLayer = image.AddThresholdAdjustmentLayer();
// Atur parameter lapisan.
thresholdLayer.Level = 115;
image.Save(outputPsdWithoutThresholdLayer);
image.Save(outputPngWithoutThresholdLayer, new PngOptions());
}
PSDNET-149. Dukungan Lapisan Penyesuaian Warna Selective
string sourceFileWithSelectiveColorLayer = "houses_selectiveColor_source.psd";
string outputPsdWithSelectiveColorLayer = "houses_selectiveColor_output.psd";
string outputPngWithSelectiveColorLayer = "houses_selectiveColor_output.png";
string sourceFileWithoutSelectiveColorLayer = "houses_source.psd";
string outputPsdWithoutSelectiveColorLayer = "houses_output.psd";
string outputPngWithoutSelectiveColorLayer = "houses_output.png";
void AssertAreEqual(object expected, object actual)
{
if (!object.Equals(expected, actual))
{
throw new Exception("Objek tidak sama.");
}
}
// Dapatkan, periksa, dan ubah lapisan penyesuaian Warna Selektif dari gambar.
using (var image = (PsdImage)Image.Load(sourceFileWithSelectiveColorLayer))
{
foreach (var layer in image.Layers)
{
if (layer is SelectiveColorLayer)
{
// Dapatkan lapisan penyesuaian Warna Selektif.
SelectiveColorLayer selcLayer = (SelectiveColorLayer)layer;
var redCorrection = selcLayer.GetCmykCorrection(SelectiveColorsTypes.Reds);
var yellowCorrection = selcLayer.GetCmykCorrection(SelectiveColorsTypes.Yellows);
var greenCorrection = selcLayer.GetCmykCorrection(SelectiveColorsTypes.Greens);
var blueCorrection = selcLayer.GetCmykCorrection(SelectiveColorsTypes.Blues);
// Periksa parameter lapisan.
AssertAreEqual(CorrectionMethodTypes.Absolute, selcLayer.CorrectionMethod);
AssertAreEqual(redCorrection.Cyan, (short)-31);
AssertAreEqual(redCorrection.Magenta, (short)-12);
AssertAreEqual(redCorrection.Yellow, (short)27);
AssertAreEqual(redCorrection.Black, (short)33);
AssertAreEqual(yellowCorrection.Cyan, (short)-22);
AssertAreEqual(yellowCorrection.Magenta, (short)-19);
AssertAreEqual(yellowCorrection.Yellow, (short)8);
AssertAreEqual(yellowCorrection.Black, (short)0);
AssertAreEqual(greenCorrection.Cyan, (short)0);
AssertAreEqual(greenCorrection.Magenta, (short)0);
AssertAreEqual(greenCorrection.Yellow, (short)0);
AssertAreEqual(greenCorrection.Black, (short)0);
AssertAreEqual(blueCorrection.Cyan, (short)58);
AssertAreEqual(blueCorrection.Magenta, (short)18);
AssertAreEqual(blueCorrection.Yellow, (short)1);
AssertAreEqual(blueCorrection.Black, (short)7);
// Ubah parameter lapisan.
selcLayer.CorrectionMethod = CorrectionMethodTypes.Relative;
selcLayer.SetCmykCorrection(SelectiveColorsTypes.Reds, new CmykCorrection { Cyan = 12, Magenta = -20, Yellow = 10, Black = -15 });
selcLayer.SetCmykCorrection(SelectiveColorsTypes.Whites, new CmykCorrection { Cyan = 15, Magenta = 20, Yellow = -75, Black = 42 });
image.Save(outputPsdWithSelectiveColorLayer);
image.Save(outputPngWithSelectiveColorLayer, new PngOptions());
}
}
}
// Tambahkan dan atur lapisan penyesuaian Warna Selektif ke gambar.
using (var image = (PsdImage)Image.Load(sourceFileWithoutSelectiveColorLayer))
{
// Tambahkan lapisan Penyesuaian Warna Selektif.
SelectiveColorLayer selectiveColorLayer = image.AddSelectiveColorAdjustmentLayer();
// Atur parameter lapisan.
selectiveColorLayer.CorrectionMethod = CorrectionMethodTypes.Absolute;
selectiveColorLayer.SetCmykCorrection(SelectiveColorsTypes.Whites, new CmykCorrection { Cyan = 100, Magenta = -100, Yellow = 100, Black = 0 });
selectiveColorLayer.SetCmykCorrection(SelectiveColorsTypes.Blacks, new CmykCorrection { Cyan = 10, Magenta = 15, Yellow = 17, Black = -3 });
selectiveColorLayer.SetCmykCorrection(SelectiveColorsTypes.Neutrals, new CmykCorrection { Cyan = 45, Magenta = 21, Yellow = -14, Black = 0 });
selectiveColorLayer.SetCmykCorrection(SelectiveColorsTypes.Magentas, new CmykCorrection { Cyan = 8, Magenta = -10, Yellow = -14, Black = 25 });
image.Save(outputPsdWithoutSelectiveColorLayer);
image.Save(outputPngWithoutSelectiveColorLayer, new PngOptions());
}
PSDNET-801. Kemampuan untuk mengekspor PSD TimeLine ke file Animated Gif
string sourceFile = "4_animated.psd";
string outputGif = "out_4_animated.psd.gif";
using (var psdImage = (PsdImage)Image.Load(sourceFile, new PsdLoadOptions() { LoadEffectsResource = true }))
{
psdImage.Timeline.Save(outputGif, new GifOptions());
}
PSDNET-864. Mengganti gambar dalam objek cerdas tidak memperbarui
string sourceFile = "neiyi.psd";
string changeFile = "bg6.png";
string exportFile = "export.psd";
string exportImgBefore = "export_before.png";
string exportImgAfter = "export_after.png";
using (var psdImage = (PsdImage)Image.Load(sourceFile))
{
foreach (Layer layer in psdImage.Layers)
{
if (layer is SmartObjectLayer && layer.Name == "sucai1")
{
SmartObjectLayer smartObjectLayer = (SmartObjectLayer)layer;
smartObjectLayer.ReplaceContents(changeFile);
smartObjectLayer.EmbedLinked();
break;
}
}
psdImage.Save(exportFile, new PsdOptions());
psdImage.Save(exportImgBefore, new PngOptions());
}
using (var psdImage = (PsdImage)Image.Load(exportFile))
{
psdImage.Save(exportImgAfter, new PngOptions());
}
PSDNET-1401. Refaktor API TimeLine
string sourceFile = "4_animated.psd";
string outputFile = "output_edited.psd";
using (var psdImage = (PsdImage)Image.Load(sourceFile))
{
Timeline timeline = psdImage.Timeline;
// Tambahkan satu frame lagi
List<Frame> frames = new List<Frame>(timeline.Frames);
frames.Add(new Frame());
timeline.Frames = frames.ToArray();
timeline.SwitchActiveFrame(4);
psdImage.Save(outputFile);
}
PSDNET-1404. File PSD tidak dapat disimpan sebagai PSD dengan pengecualian berikut: Mode Rgb dan Lab tidak boleh mengandung kurang dari 3 saluran dan lebih dari 4 saluran
string sourceFile = "Ex3_B1H1_Dave_Arthur.psd";
string exportPath = "export.psd";
using (PsdImage image = (PsdImage)Image.Load(sourceFile))
{
// Mengambil opsi penyimpanan default dari header tetapi header memiliki jumlah saluran yang salah.
try
{
image.Save(exportPath);
}
catch (PsdImageException ex)
{
if (ex.Message != "Rgb and Lab modes can not contain less than 3 channels and