Java Image Processing API
Draw, transform, compress or convert images without requiring any image editor.
Aspose.Imaging for Java is a high-performance and well-documented imaging library that provides the most flexible group of processing routines for the developers to create, manipulate, save and convert images in their Java applications, without the need of an image editor.
It facilitates the developers in processing tasks such as converting any picture from one format to another, drawing native objects as well as GraphicsPaths and geometric transformations such as scaling, rotation, and flipping. Furthermore, API supports to manipulate multiple frames from TIFF files. Aspose.Imaging for Java supports a wide range of compression algorithms along with various formats from raster-based graphical imaging.
- At aGlance
- Supported FileFormats
Aspose.Imaging for Java supports a wide range of conventional & special image file formats.
- Raster Formats: JPEG2000, JPEG, BMP, TIFF, GIF, PNG
- Metafiles: EMF, WMF
- Others: WebP, Svg
- Photoshop: PSD
- EPS (raster preview only)
Advanced Java Images Processing API Features
Create images from scratch
Load & edit existing images
Crop, resize & rotate-flip images
Export images to a variety of formats
Extract frames from multi-page Tiff image
Add multiple images as Tiff frames
Image Format Conversion in an Easy Way
Aspose.Imaging for Java API provides an array of advanced algorithms encapsulated by specialized classes for format conversion. These classes are simple to use and can convert images to conventional raster formats as well as to PSD, SVG, WMF, EMF, DjVu, DICOM, DNG & WebP formats.
Save the image in different formats - Java
// load file to be converted Image img = Image.load(dir + "template.jpg"); // save in PSD format img.save(dir + "output.psd", new PsdOptions()); // save in TIFF format img.save(dir + "output.tiff", new TiffOptions(TiffExpectedFormat.Default)); // convert jpg to SVG format SvgOptions svgOptions = new SvgOptions(); SvgRasterizationOptions svgRasterizationOptions = new SvgRasterizationOptions(); svgRasterizationOptions.setPageWidth(img.getWidth()); svgRasterizationOptions.setPageHeight(img.getHeight()); svgOptions.setVectorRasterizationOptions(svgRasterizationOptions); img.save(dir + "output.svg", svgOptions);
Register Custom File Formats
Another promising feature that Aspose.Imaging for Java API provides is to register custom formats. The library allows the developers to register new custom file formats to create, open or export to by using one of Aspose.Imaging for Java registry APIs for the corresponding operation. This feature allows the addition of new file formats that can be used for drawing and export purposes.
Transform Images to Grayscale
Grayscaling is the process of converting a continuous-tone image to an image with discontinues gray shades. With Aspose.Imaging, converting any image to its grayscale representation is as simple as calling a single method on the supplied RasterImage.
Convert an image to grayscale representation - Java
// load the file to be transformed Image img = Image.load(dir + "template.png"); // cast to RasterCachedImage RasterImage rasterImage = (RasterImage) img; // transform to its grayscale representation rasterImage.grayscale(); // save the resultant image rasterImage.save(dir + "output.png");
Extract Data from TIFF Formats
The image processing library allows data recovery from broken TIFF with some loss. API loads TIFF file having corrupted data strips or improper data layout and replaces corrupted data with some color. Developers can further process the resultant image without experiencing errors using the API.