Browse our Products

Aspose.Imaging for JAVA 25.2 - Release notes

Please note: since version 25.2 stopped support of JDK 1.6 and 1.7

Competitive features:

KeySummaryCategory
IMAGINGJAVA-8895Blank output image on converting TIFFEnhancement
IMAGINGJAVA-8894Creating a PNG with BitDepth=16 throws an exception in evaluation modeEnhancement
IMAGINGJAVA-8890PNG to PDF: Temporary files not deletedEnhancement
IMAGINGJAVA-8884Reduce memory usage during AVIF image loading.Enhancement
IMAGINGJAVA-8879Fix bugs with rendering some characters in CDR formatEnhancement
IMAGINGJAVA-8878Some EXIF metadata props are missing after JPEG to TIFFEnhancement
IMAGINGJAVA-8876Conversion of PNG file from 8 bit per channel to 16 fails without a licenseEnhancement
IMAGINGJAVA-8869Regression: EMF to PDF: Blank output fileEnhancement
IMAGINGJAVA-8788Error in image save without licenseEnhancement
IMAGINGJAVA-8139Incorrect conversion from EPS to PNGEnhancement

Public API changes:

Added APIs:

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

Removed APIs:

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

Usage Examples:

IMAGINGJAVA-8895 Blank output image on converting TIFF

String inputPath = "input.tiff";
try (Image image = Image.load(inputPath))
{
    image.save(inputPath + ".pdf");
}

IMAGINGJAVA-8894 Creating a PNG with BitDepth=16 throws an exception in evaluation mode

String outputPath = "output64Bit.png";

PngOptions createOptions = new PngOptions()
{{
    setBitDepth(16);
    setColorType(PngColorType.TruecolorWithAlpha);
    setCompressionLevel(9);
    setFilterType(PngFilterType.Sub);
    setProgressive(true);
}};

License lic = new License();
lic.SetLicense(""); // no license

try (PngImage pngImage = new PngImage(createOptions, 100, 100))
{
    Graphics graphics = new Graphics(pngImage);

    LinearGradientBrush gradientBrush = new LinearGradientBrush(
        new Point(0, 0),
        new Point(pngImage.getWidth(), pngImage.getHeight()),
        Color.getBlue(),
        Color.getTransparent());

    graphics.fillRectangle(gradientBrush, pngImage.getBounds());

    pngImage.save(outputPath);
}

IMAGINGJAVA-8890 PNG to PDF: Temporary files not deleted

try (Image pngImage = Image.load("high_resolution_image.png"))
{
    PdfOptions exportOptions = new PdfOptions();
    pngImage.save("out".pdf, exportOptions);
}

IMAGINGJAVA-8884 Reduce memory usage during AVIF image loading.

### Example
The sample AVIF image is exported into a PNG image format. Compared to the previous version, processing speed has increased approximately 12 times, while memory usage has been reduced by about 20 times.

String inputPath = "input.avif";
String outputPath = "output.png";

try (AvifImage image = (AvifImage)Image.load(inputPath))
{
	image.save(outputPath);
}

IMAGINGJAVA-8879 Fix bugs with rendering some characters in CDR format

try (Image image = Image.load("Test corel.cdr"))
{
    image.save("result.png", new PngOptions()
    {{
        setVectorRasterizationOptions(new CdrRasterizationOptions()
        {{
            setPositioning(PositioningTypes.DefinedByDocument);
        }});
    }});
}

IMAGINGJAVA-8878 Some EXIF metadata props are missing after JPEG to TIFF

int imageOrientation = 0;
String inputPath = "input.jpeg";
try (Image image = Image.load(inputPath))
{
    if (image instanceof IHasExifData)
    {
		IHasExifData hasExif = (IHasExifData) image;
		if (hasExif.getExifData() != null)
        {
			imageOrientation = hasExif.getExifData().getOrientation();
		}
    }

    image.save(inputPath + ".tiff", 
		new TiffOptions(TiffExpectedFormat.TiffJpegRgb)
			{{
				setKeepMetadata(true);
			}});
}

int outputOrientation = 0;
try (Image image = Image.load(inputPath))
{
    if (image instanceof IHasExifData)
    {
		IHasExifData hasExif = (IHasExifData) image;
		if (hasExif.getExifData() != null)
        {
			outputOrientation = hasExif.getExifData().getOrientation();
		}
    }
}

assert imageOrientation == outputOrientation;

IMAGINGJAVA-8876 Conversion of PNG file from 8 bit per channel to 16 fails without a license

License lic = new License();
lic.SetLicense(""); // no license
try (Image image = Image.load("OutputAllTypes2.png"))
{
	PngOptions options = new PngOptions()
	{{
		setBitDepth(16);
		setColorType(PngColorType.TruecolorWithAlpha);
	}};

	image.save("OutputAllTypes2-64Bit.png", options);
}

IMAGINGJAVA-8869 Regression: EMF to PDF: Blank output file

try (Image image = Image.load("example.emf"))
{
    EmfRasterizationOptions rasterOpts = new EmfRasterizationOptions();
    rasterOpts.setPageWidth(image.getWidth());
    rasterOpts.setPageHeight(image.getHeight());
    rasterOpts.setBackgroundColor(Color.getWhiteSmoke());
    PdfOptions pdfOptions = new PdfOptions();
    pdfOptions.setVectorRasterizationOptions(rasterOpts);
    image.save("emf_out.pdf", pdfOptions);
}

IMAGINGJAVA-8788 Error in image save without license

License lic = new License();
lic.setLicense(""); // no license
try (Image image = Image.load("OutputAllTypes2.png"))
{
	PngOptions options = new PngOptions();
	options.setBitDepth(16);
    options.setColorType(PngColorType.TruecolorWithAlpha);

	image.save("OutputAllTypes2-64Bit.png", options);
}

IMAGINGJAVA-8139 Incorrect conversion from EPS to PNG

try (Image image = Image.load("C3.eps"))
{
	image.save("output.png", new PngOptions());
}