Aspose.Imaging for .NET 21.9 - Release notes

Competitive features:

  • Implement support a “PANTONE goe coated” pallete in the CDR format
KeySummaryCategory
IMAGINGNET-4439Implement support a “PANTONE goe coated” pallete in the CDR formatFeature
IMAGINGNET-4648Blurred output GIF to PDFEnhancement
IMAGINGNET-4644Exception on converting WMZ to PNGEnhancement
IMAGINGNET-4612SVG to PNG, output image distortedEnhancement
IMAGINGNET-4589Aspose.Imaging 21.6: DICOM Image loading failedEnhancement
IMAGINGNET-4580WebP Image Loads with incorrect colorEnhancement
IMAGINGNET-4455“Image export failed.” exception when rendering CDR to PNGEnhancement
IMAGINGNET-4409Fix bugs in the PowerClip objects rendering and implement support two-color raster imageEnhancement
IMAGINGNET-4396Improve ICC profile export on Tiff image savingEnhancement
IMAGINGNET-4384“Image loading failed.” exception when open document CDR fileEnhancement
IMAGINGNET-4129Incorrect watermark when saving GIF frameEnhancement

Public API changes:

Added APIs:

Class Aspose.Imaging.ImageOptions.PdfImageCompressionOptions

Field/Enum Aspose.Imaging.ImageOptions.PdfImageCompressionOptions.Auto

Field/Enum Aspose.Imaging.ImageOptions.PdfImageCompressionOptions.Ccitt3

Field/Enum Aspose.Imaging.ImageOptions.PdfImageCompressionOptions.Ccitt4

Field/Enum Aspose.Imaging.ImageOptions.PdfImageCompressionOptions.Flate

Field/Enum Aspose.Imaging.ImageOptions.PdfImageCompressionOptions.Jpeg

Field/Enum Aspose.Imaging.ImageOptions.PdfImageCompressionOptions.LzwBaselinePredictor

Field/Enum Aspose.Imaging.ImageOptions.PdfImageCompressionOptions.LzwOptimizedPredictor

Field/Enum Aspose.Imaging.ImageOptions.PdfImageCompressionOptions.None

Field/Enum Aspose.Imaging.ImageOptions.PdfImageCompressionOptions.Rle

Property Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock.BackgroundColor

Property Aspose.Imaging.FileFormats.Pdf.PdfCoreOptions.Compression

Property Aspose.Imaging.ImageOptions.TiffOptions.DisableIccExport

Removed APIs:

Usage Examples:

IMAGINGNET-4648 Blurred output GIF to PDF

string baseFolder = @"D:\";
string fileName = "Referral Elsa A_LI (1).gif";
string inputFileName = Path.Combine(baseFolder, fileName);
string outFileName = inputFileName + ".pdf";
using (var image = Image.Load(inputFileName))
{
    image.Save(outFileName, new PdfOptions());
}

IMAGINGNET-4644 Exception on converting WMZ to PNG

string fileName = "image001 (1).wmz";
string baseFolder = @"D:\";
string inputFileName = Path.Combine(baseFolder, fileName);
string outputFileName = inputFileName + ".png";
using (var image = Image.Load(inputFileName))
{
    image.Save(outputFileName, new PngOptions() { ColorType = PngColorType.TruecolorWithAlpha });
}

IMAGINGNET-4612 SVG to PNG, output image distorted

string baseFolder = @"D:\";
string[] fileNames = {"logo1.svg", "logo2.svg", "logo3.svg", "input.svg" };
foreach (var fileName in fileNames)
{
   string inputFileName = Path.Combine(baseFolder, fileName);
   string outputFileName = inputFileName + "Fixed.png";
   using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(inputFileName))
   {
       image.Save(outputFileName, new PngOptions());
   }
}

IMAGINGNET-4589 Aspose.Imaging 21.6: DICOM Image loading failed

using (Image image = Image.Load("test.dcm"))
{
	image.Save("output.png", new PngOptions());
}

IMAGINGNET-4580 WebP Image Loads with incorrect color

string fileName = "Control.webp";
string basePath = @"D:\";
string inputFilePath = Path.Combine(basePath, fileName);
string outputFilePath = inputFilePath + ".png";
using (Image image = Image.Load(inputFilePath))
{
     image.Save(outputFilePath, new PngOptions());
}

IMAGINGNET-4455 “Image export failed.” exception when rendering CDR to PNG

var baseFolder = @"D:\cdr\";
var fileName = "Áåçûìÿííûé-1.cdr";
var inputFilePath = Path.Combine(baseFolder, fileName);
var outputFilePath = inputFilePath + ".png";
using (var image = (CdrImage) Image.Load(inputFilePath))
{
    image.Save(outputFilePath, new PngOptions());
}

IMAGINGNET-4439 Implement support a “PANTONE goe coated” pallete in the CDR format

var baseFolder = @"D:\";
var fileName = "test.cdr";
var inputFilePath = Path.Combine(baseFolder, fileName);
var outputFilePath = inputFilePath + ".png";
using (var image = (CdrImage)Image.Load(inputFilePath))
{
    image.Save(outputFilePath, new PngOptions()
    {
        VectorRasterizationOptions = new CdrRasterizationOptions
        {
             Positioning = PositioningTypes.Relative
        }
    });
}

IMAGINGNET-4409 Fix bugs in the PowerClip objects rendering and implement support two-color raster image

string baseFolder = @"D:\";
string[] files = new string[] { "Qurve.cdr", "Lakshaya School Brochures.cdr"};
for (var i = 0; i < files.Length; i++)
{
    var fileName = files[i];
    string inputFilePath = Path.Combine(baseFolder, fileName);
    string outputFilePath = inputFilePath + ".png";
    using (CdrImage image = (CdrImage)Image.Load(inputFilePath))
    {
        image.Save(outputFilePath, new PngOptions()
        {
             VectorRasterizationOptions = new CdrRasterizationOptions()
             {
                 Positioning = PositioningTypes.Relative
             }
        });
     }
}

IMAGINGNET-4396 Improve ICC profile export on Tiff image saving

using (TiffImage source = (TiffImage)Image.Load("image.tiff"))
{
    source.Save("output.tiff", new TiffOptions(source.ActiveFrame.FrameOptions) { DisableIccExport = true });
}

IMAGINGNET-4384 “Image loading failed.” exception when open document CDR file

var baseFolder = @"D:\";
var fileName = "SI-13.cdr";
var inputFilePath = Path.Combine(baseFolder, fileName);
var outputFilePath = inputFilePath + ".png";
using (var image = (CdrImage) Image.Load(inputFilePath))
{
    image.Save(outputFilePath, new PngOptions());
}

IMAGINGNET-4129 Incorrect watermark when saving GIF frame

using (var image = (GifImage)Image.Load("2086.gif"))
{
    image.Pages[0].Save("Frame.png", new PngOptions());
}