Browse our Products

Aspose.Imaging for .NET 22.7 - Release notes

Competitive features:

  • Allow speed or memory optimization strategies for Cdr format
  • Added support of NET6 configuration for Aspose.Imaging
KeySummaryCategory
IMAGINGNET-3418Allow speed or memory optimization strategies for Cdr formatFeature
IMAGINGNET-4973Add support of NET6 configurationFeature
IMAGINGNET-5498Svg to Dxf export failedEnhancement
IMAGINGNET-5476“There is no active frame selected.” on a multipage Tiff creationEnhancement
IMAGINGNET-5439System.NullReferenceException while rotating or flipping particular GIF animationEnhancement
IMAGINGNET-5411The Thai language characters must be converted correctlyEnhancement
IMAGINGNET-5400Error converting an Eps image to the Emf formatEnhancement
IMAGINGNET-5357Incorrect saving Compress property in bmpEnhancement
IMAGINGNET-5246Can’t convert SVG to BMPEnhancement
IMAGINGNET-4584Cannot convert particular EPS image into PNGEnhancement
IMAGINGNET-4502“Image loading failed.” exception when open CDR fileEnhancement
IMAGINGNET-4498“Key ‘rmoveto’ is not found on dictionary stack’” exception when calling “Size” property for EPSEnhancement

Public API changes:

Added APIs:

Class Aspose.Imaging.CoreExceptions.IncorrectPasswordException

Class Aspose.Imaging.ImageLoadOptions.OdLoadOptions

Method Aspose.Imaging.CoreExceptions.IncorrectPasswordException.#ctor(System.String)

Method Aspose.Imaging.CoreExceptions.IncorrectPasswordException.#ctor (System.String,System.Exception)

Method Aspose.Imaging.FileFormats.OpenDocument.OdgImage.#ctor (Aspose.Imaging.StreamContainer,Aspose.Imaging.LoadOptions)

Method Aspose.Imaging.FileFormats.OpenDocument.OdImage.#ctor (Aspose.Imaging.StreamContainer,Aspose.Imaging.LoadOptions)

Method Aspose.Imaging.FileFormats.OpenDocument.OtgImage.#ctor (Aspose.Imaging.StreamContainer,Aspose.Imaging.LoadOptions)

Method Aspose.Imaging.ImageLoadOptions.OdLoadOptions.#ctor

Property Aspose.Imaging.ImageLoadOptions.OdLoadOptions.Password

Property Aspose.Imaging.ImageOptions.TiffOptions.ExtraSamples

Removed APIs:

Usage Examples:

IMAGINGNET-5498 Svg to Dxf export failed

string baseFolder = @"D:\";
string inputFile = Path.Combine(baseFolder, "art.svg");
string outputFile = inputFile + ".dxf";
using (Image image = Image.Load(inputFile))
{
    var widthInPixels = 600 * 1800;
    var heightPixels = 600 * 1500;

    var exportOptions = new DxfOptions()
    {
        TextAsLines = true,
        ConvertTextBeziers = true,
        FullFrame = true,
        VectorRasterizationOptions = new SvgRasterizationOptions()
        {
            PageWidth = (float)widthInPixels,
            PageHeight = (float)heightPixels,
            FullFrame = true,
            Positioning = PositioningTypes.DefinedByDocument,
            CenterDrawing = true,
            BackgroundColor = Color.Transparent
        }
    };

    image.Save(outputFile, exportOptions);
}

IMAGINGNET-5476 “There is no active frame selected.” on a multipage Tiff creation

TiffImage source = (TiffImage) Image.Load("image.tiff");

TiffOptions options = new TiffOptions(TiffExpectedFormat.Default)
{
    BitsPerSample = new ushort[] {8, 8, 8},
    Photometric = TiffPhotometrics.Rgb,
    Xresolution = new TiffRational(72),
    Yresolution = new TiffRational(72),
    ResolutionUnit = TiffResolutionUnits.Inch,
    PlanarConfiguration = TiffPlanarConfigs.Contiguous,
    Compression = TiffCompressions.None
};

using (TiffImage tiffImage = new TiffImage(new TiffFrame(options, 1, 1)))
{
    foreach (TiffFrame frame in source.Frames)
    {
        TiffFrame copiedFrame = TiffFrame.CopyFrame(frame);
        tiffImage.AddFrame(copiedFrame);
    }

    if (tiffImage.Frames.Length > 1)
    {
        tiffImage.ActiveFrame = tiffImage.Frames[1];
        tiffImage.RemoveFrame(0);
        tiffImage.ActiveFrame = null;
    }

    tiffImage.Save("output.tiff");
    source.Dispose();
}

IMAGINGNET-5439 System.NullReferenceException while rotating or flipping particular GIF animation

GIF rotation example:

using (var image = Image.Load("input.gif"))
{
    image.RotateFlip(RotateFlipType.RotateNoneFlipX);
    image.Save("rotated.gif");
}

IMAGINGNET-5411 The Thai language characters must be converted correctly

string baseFolder = @"D:\";
 string file = "data.emf";
 string inputFileName = Path.Combine(baseFolder, file);
 string outputFileName = inputFileName + ".pdf";
 using (Image image = Image.Load(inputFileName))
 {
     image.Save(outputFileName, new PdfOptions(){VectorRasterizationOptions = new EmfRasterizationOptions(){RenderMode = EmfRenderMode.EmfOnly, PageSize = image.Size}});
 }

IMAGINGNET-5400 Error converting an Eps image to the Emf format

using (var image = Image.Load("16745-1_ovitex_4c_pht page 19_LPR.eps"))
{
    //Obtain default saving options defined for each image
    ImageOptionsBase exportOptions = new EmfOptions();

    if (image is VectorImage)
    {
        VectorRasterizationOptions rasterizationOptions = new EmfRasterizationOptions();
        rasterizationOptions.PageWidth = image.Width;
        rasterizationOptions.PageHeight = image.Height;
        exportOptions.VectorRasterizationOptions = rasterizationOptions;
    }

    image.Save(outputFilePath, exportOptions);
}

IMAGINGNET-5357 Incorrect saving Compress property in bmp

[Test]
public void Test()
{
    var imagePath = "test.bmp";

    using (Image bmpImage = Image.Load(imagePath))
    {
        var bmpOptions = new BmpOptions
        {
            Compression = BitmapCompression.Rgb
        };
        
        Image testImage;
        using (var stream = new MemoryStream())
        {
            bmpImage.Save(stream, bmpOptions);

            stream.Position = 0;
            testImage = Image.Load(stream);
        }

        var savedBmpImage = testImage as BmpImage;

        Assert.IsTrue(savedBmpImage.Compression == BitmapCompression.Rgb);
    }
}

IMAGINGNET-5246 Can’t convert SVG to BMP

var baseFolder = @"D:\";
 var files = new string[] {"hola.svg", "hola2.svg"};
 foreach (var file in files)
 {
     var inputFileName = Path.Combine(baseFolder, file);
     var outputFileName = inputFileName + ".png";
     using (var image = Image.Load(inputFileName))
     {
         image.Save(outputFileName);
     }
 }

IMAGINGNET-4584 Cannot convert particular EPS image into PNG

using (var image = Image.Load("3_a_1_2.eps"))
{
   image.Save("output.png", new PngOptions());
}

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

var baseFolder = @"D:\";
var fileName = "6õ4 ÎÑÍÎÂÀ.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.DefinedByDocument
        }
    });
}

IMAGINGNET-4498 “Key ‘rmoveto’ is not found on dictionary stack’” exception when calling “Size” property for EPS

var inputFilePath = "fadel.eps";
using (var image = Image.Load(inputFilePath))
{
	var t = image.Size;
}

IMAGINGNET-3418 Allow speed or memory optimization strategies for Cdr format

var baseFolder = @"D:\";
var fileName = "6õ4 ÎÑÍÎÂÀ.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.DefinedByDocument
        }
    });
}