Export Texture Brush to Vectorized PSD
Ability to export the texture brushes to the vectorized Adobe Photoshop® PSD format via API.
CdrRasterizationOptions rasterizationOptions = new CdrRasterizationOptions();
PsdVectorizationOptions psdVectorizationOptions = new PsdVectorizationOptions()
{
VectorDataCompositionMode = VectorDataCompositionMode.SeparateLayers
};
PsdOptions psdOptions = new PsdOptions()
{
VectorRasterizationOptions = rasterizationOptions,
VectorizationOptions = psdVectorizationOptions
};
string inputFileName = "brushes.cdr";
string outputFileName = "brushes.cdr.psd";
using (Image image = Image.Load(inputFileName))
{
psdOptions.VectorRasterizationOptions.PageWidth = image.Width;
psdOptions.VectorRasterizationOptions.PageHeight = image.Height;
image.Save(outputFileName, psdOptions);
}
Improved Resampling Quality transparency, resampling = color intensity
This version of the image processing API has considerably improved the resampling quality via transparency handling and color intensity on borders.
List<ResizeType> resizeTypes = new List<ResizeType>()
{
ResizeType.NearestNeighbourResample,
ResizeType.AdaptiveResample,
ResizeType.Bell,
ResizeType.BilinearResample,
ResizeType.CatmullRom,
ResizeType.CubicBSpline,
ResizeType.CubicConvolution,
ResizeType.HighQualityResample,
ResizeType.LanczosResample
};
foreach (ResizeType resizeType in resizeTypes)
{
using (Image image = Image.Load("square-499.png"))
{
image.Resize(400, 400, resizeType);
image.Save("square-499" + resizeType + ".png");
}
}
Improved Handling of SVG TSPAN
Elements
Previously, in some instances the alignment of the SVG TSPAN
elements was having issues. Now those have been resolved by improving the SVG TSPAN
elements handling in the API.
const string baseFolder = @"D:\";
const string fileName = "w3c_tspan02.svg";
var inputFileName = Path.Combine(baseFolder, fileName);
var outFileName = inputFileName + ".png";
using (Image image = Image.Load(inputFileName))
{
image.Save(outFileName, new PngOptions());
}
For a complete list of features, enhancements, and bug fixes in this release please visit, Aspose.Imaging for .NET 22.4.