Aspose.Imaging for .NET 22.3 - Release notes

Competitive features:

  • Original Dicom tags should be kept on export
  • Implement export from Aps to Vectorized PSD
KeySummaryCategory
IMAGINGNET-5073Original Dicom tags should be kept on exportFeature
IMAGINGNET-4572Implement export from Aps to Vectorized PSDFeature
IMAGINGNET-5064Type of profile ColorSpaceClass is not supportedEnhancement
IMAGINGNET-5063Resolve unsupported options combination for tiffEnhancement
IMAGINGNET-5002Loosing transparency during the export from PNG to the BMP 32bitsEnhancement
IMAGINGNET-5001Not all pages visible in specific DCM fileEnhancement
IMAGINGNET-4966Exception occur when save tiff image to streamEnhancement

Public API changes:

Added APIs:

Field/Enum Aspose.Imaging.StringFormatFlags.ExactAlignment

Removed APIs:

Usage Examples:

IMAGINGNET-5073 Original Dicom tags should be kept on export

using (DicomImage image = (DicomImage)Image.Load("IMG-0001-00001.dcm"))
{
    image.Save(outputFilePath);

    using (DicomImage imageSaved = (DicomImage)Image.Load("output1.dcm"))
    {
        bool isSuccess = Math.Abs(imageSaved.FileInfo.DicomInfo.Count - image.FileInfo.DicomInfo.Count) < 5;
    }
}

IMAGINGNET-5001 Not all pages visible in specific DCM file

using (FileStream stream = File.OpenRead("IMG-0001-00001.dcm"))
{
	Aspose.Imaging.FileFormats.Dicom.DicomImage dicom = new Aspose.Imaging.FileFormats.Dicom.DicomImage(stream);
	if (dicom.PageCount == 34)
	{
		Console.WriteLine("OK - 34 pages");
	}
	else
	{
		Console.WriteLine($"Error - In file actually 34 pages, but now is only {dicom.PageCount}");
	}
}

IMAGINGNET-5064 Type of profile ColorSpaceClass is not supported

 string baseFolder = @"D:\";
 string fileName = "Input.tiff";
 string inputFileName = Path.Combine(baseFolder, fileName);
 string outputFileName = inputFileName + ".png";
 using (Image image = Image.Load(inputFileName, new LoadOptions()))
 {
     image.Save(outputFileName, new PngOptions());
 }

IMAGINGNET-5063 Resolve unsupported options combination for tiff

string baseFolder = @"D:\";
string fileName = "input.tif";
string inputFileName = Path.Combine(baseFolder, fileName);
string outputFileName = inputFileName + ".pdf";
using (Image image = Image.Load(inputFileName))
{
    image.Save(outputFileName, new PdfOptions());
}

IMAGINGNET-4966 Exception occur when save tiff image to stream

using (var image = Aspose.Imaging.Image.Load(@"48170.tiff"))
            {
                image.Save(@"out48170.tiff");
            }

IMAGINGNET-4572 Implement export from Aps to Vectorized PSD

//Export vector image to PSD format keeping vector shapes

//Aspose.Imaging allows to export vector image formats such as CDR, EMF, EPS, ODG, SVG, WMF to the PSD format,
//while keeping vector properties of the original, utilizing PSD Shapes, Paths //and Vector Masks.
//Currently, export of not very complex shapes is supported, whithout texture brushes or open shapes with stroke,
//which will be improved in the upcoming releases.
//Example

//Export from the CDR format to the PSD format preserving vector
//properties is as simple as the following snippet:

using (Image image = Imaging.Image.Load("sample.cdr"))
{
    PsdOptions imageOptions = new PsdOptions()
    {
        VectorRasterizationOptions = options,
        VectorizationOptions = new PsdVectorizationOptions()
        {
            VectorDataCompositionMode = VectorDataCompositionMode.SeparateLayers
        }
    };
    imageOptions.VectorRasterizationOptions.PageWidth = image.Width;
    imageOptions.VectorRasterizationOptions.PageHeight = image.Height;

    image.Save(outputFileName, imageOptions);
}

IMAGINGNET-5064 Type of profile ColorSpaceClass is not supported

 string baseFolder = @"D:\";
 string fileName = "Input.tiff";
 string inputFileName = Path.Combine(baseFolder, fileName);
 string outputFileName = inputFileName + ".png";
 using (Image image = Image.Load(inputFileName, new LoadOptions()))
 {
     image.Save(outputFileName, new PngOptions());
 }

IMAGINGNET-5002 Loosing transparency during the export from PNG to the BMP 32bits

var sourcePath = "input.png"; // png image with alpha
var outputPath = "output-bmp.bmp";

using (Image pngImage = Image.Load(sourcePath))
{
    pngImage.Save(outputPath, new BmpOptions());
}

IMAGINGNET-4966 Exception occur when save tiff image to stream

using (var image = Aspose.Imaging.Image.Load(@"48170.tiff"))
            {
                image.Save(@"out48170.tiff");
            }

IMAGINGNET-4966 Exception occur when save tiff image to stream

using (var image = Aspose.Imaging.Image.Load(@"48170.tiff"))
            {
                image.Save(@"out48170.tiff");
            }