Your First Aspose.Imaging for Java Application

All Aspose components, when installed, work in evaluation mode. The evaluation mode has no time limit and it injects watermarks into the produced Images.

Creating an Application that Uses Aspose.Imaging

To work with Aspose.Imaging in your applications:

  1. Download Aspose.Imaging.
  2. Create a project.
  3. Add a reference to the Aspose.Imaging API.
  4. Write the code.

Download Aspose.Imaging for Java

  1. Download Aspose.Imaging for Java.
  2. Unzip the downloaded ZIP archive on your development computer, for example D:\Java.Imaging-API.

Create Project

  1. Launch the MyEclipse IDE.

  2. In the main toolbar, click New Java Project, or, from the File menu, select New Java Project.

  3. Enter the project name.

  4. Click Finish.

    Creating a project in MyEclipse


Add Reference of Aspose.Imaging for Java API

The project uses the Aspose.Imaging API as the core library for performing image operations. So, you have to reference the Aspose.Imaging JAR in the project .

  1. Select the project’s properties menu (right click on the project) as shown.

    Right-clicking the project opens a menu. The Properties option can be found at the bottom


  1. Select the Java Build Path option.

  2. Click Add External Jar.

    The project properties dialog


  1. Select the Aspose.Imaging file to add it to the project.

    Adding the Aspose.Imaging JAR to the project


Write MyClass.Java

The next step is to create a new class.

  1. Click on New Java Class in the main toolbar.
  2. If not already specified, select HelloWorld/src as the source folder.
  3. Type MyClass for the class name.
  4. Select the option to create the main() method.
  5. Click Finish.

The code below uses the Aspose.Imaging API to create an image from scratch.