Aspose.Imaging for Java 22.3 - Release notes

Competitive features:

  • Implement export from Aps to Vectorized PSD
  • Original Dicom tags should be kept on export
KeySummaryCategory
IMAGINGJAVA-8056Implement export from Aps to Vectorized PSDFeature
IMAGINGJAVA-8045Original Dicom tags should be kept on exportFeature
IMAGINGJAVA-8055Resolve unsupported options combination for tiffEnhancement
IMAGINGJAVA-8053Type of profile ColorSpaceClass is not supportedEnhancement
IMAGINGJAVA-8047Not all pages visible in specific DCM fileEnhancement
IMAGINGJAVA-8046Loosing transparency during the export from PNG to the BMP 32bitsEnhancement
IMAGINGJAVA-8040Exception occur when save tiff image to streamEnhancement
IMAGINGJAVA-7905Add com.aspose.imaging.LocaleOptions.setLocale(java.util.Locale) methodEnhancement
IMAGINGJAVA-7889Some locales are not supportedEnhancement

Public API changes:

Added APIs:

Class com.aspose.imaging.LocaleOptions

Method com.aspose.imaging.LocaleOptions.setLocale

Method com.aspose.imaging.LocaleOptions.getLocale

Method com.aspose.imaging.LocaleOptions.clear

Please see corresponding cumulative API changes for Aspose.Imaging for .NET 22.3 version

Removed APIs:

Please see corresponding cumulative API changes for Aspose.Imaging for .NET 22.3 version

Usage Examples:

IMAGINGJAVA-8056 Implement export from Aps to Vectorized PSD

try (Image image = Image.load("sample.cdr"))
{
    PsdOptions imageOptions = new PsdOptions();
	imageOptions.setVectorRasterizationOptions(new CdrRasterizationOptions());
	imageOptions.setVectorizationOptions(new PsdVectorizationOptions()
		{{
			setVectorDataCompositionMode(VectorDataCompositionMode.SeparateLayers);
		}});

    imageOptions.getVectorRasterizationOptions().setPageWidth(image.getWidth());
    imageOptions.getVectorRasterizationOptions().setPageHeight(image.getHeight());

    image.save(outputFileName, imageOptions);
}

IMAGINGJAVA-8055 Resolve unsupported options combination for tiff

String baseFolder = "D:\\";
String fileName = "input.tif";
String inputFileName = baseFolder + fileName;
String outputFileName = inputFileName + ".pdf";
try (Image image = Image.load(inputFileName))
{
    image.save(outputFileName, new PdfOptions());
}

IMAGINGJAVA-8053 Type of profile ColorSpaceClass is not supported

String baseFolder = "D:\\";
String fileName = "Input.tiff";
String inputFileName = baseFolder + fileName;
String outputFileName = inputFileName + ".png";
try (Image image = Image.load(inputFileName, new LoadOptions()))
{
    image.save(outputFileName, new PngOptions());
}

IMAGINGJAVA-8047 Not all pages visible in specific DCM file

try (java.io.InputStream fileStream = new java.io.FileInputStream("IMG-0001-00001.dcm"))
{
	try (com.aspose.imaging.fileformats.dicom.DicomImage dicom = new com.aspose.imaging.fileformats.dicom.DicomImage(fileStream))
	{
		int pages = dicom.getPageCount();
		if (pages == 34)
		{
			System.out.println("OK - 34 pages");
		}
		else
		{
			System.out.println("Error - In file actually 34 pages, but now is only " + pages);
		}
	}
}

IMAGINGJAVA-8046 Loosing transparency during the export from PNG to the BMP 32bits

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

try (Image pngImage = Image.load(sourcePath))
{
	pngImage.save(outputPath, new BmpOptions());
}

IMAGINGJAVA-8045 Original Dicom tags should be kept on export

try (DicomImage image = (DicomImage)Image.load("IMG-0001-00001.dcm"))
{
    image.save("output1.dcm");

    try (DicomImage imageSaved = (DicomImage)Image.load("output1.dcm"))
    {
        boolean isSuccess = Math.abs(imageSaved.getFileInfo().getDicomInfo().getCount() - image.getFileInfo().getDicomInfo().getCount()) < 5;
    }
}

IMAGINGJAVA-8040 Exception occur when save tiff image to stream

try (com.aspose.imaging.Image image = com.aspose.imaging.Image.load("48170.tiff"))
{
	image.save("out48170.tiff");
}

IMAGINGJAVA-7905 Add com.aspose.imaging.LocaleOptions.setLocale(java.util.Locale) method

com.aspose.imaging.LocaleOptions.setLocale(Locale.FRANCE);
assert Locale.getDefault() != Locale.FRANCE;

IMAGINGJAVA-7889 Some locales are not supported

final Locale locale = new Locale("en", "DE");
Locale.setDefault(locale);

Image image = Image.load("document.djvu");
image.close();