OneNote to Image JPG PNG TIFF

Creating digital notes is like an everyday activity these days. Many people keep notes including text, drawings, pictures, and much more. You can convert such notes to images programmatically using Java. OneNote file can be rendered to JPG, PNG, as well as TIFF image with different color modes and compressions. The following sections discuss the conversions in detail:

OneNote to Image Converter – Java API Installation

You can convert a OneNote file to an Image with Aspose.Note for Java API. Simply configure the API by downloading the JAR file from the New Releases section, or with the following Maven configurations in pom.xml file of your project:

Repository:

 <repositories>
    <repository>
        <id>AsposeJavaAPI</id>
        <name>Aspose Java API</name>
        <url>https://repository.aspose.com/repo/</url>
    </repository>
</repositories>

Dependency:

 <dependencies>
    <dependency>
        <groupId>com.aspose</groupId>
        <artifactId>aspose-note</artifactId>
        <version>21.5</version>
        <classifier>jdk17</classifier>        
    </dependency>
</dependencies>

Convert OneNote to JPG Image File Programmatically using Java

You can convert a OneNote file to JPG image with the following steps:

  1. Load the input Note (.one) file using the Document class.
  2. Save output JPG image.

The code below shows how to convert a .one OneNote file to JPG image programmatically using Java:

Convert OneNote to PNG Image Programmatically using Java

You can convert a OneNote file to PNG image with below steps:

  1. Load the input file using Document class.
  2. Initialize ImageSaveOptions class object.
  3. Save the output PNG image.

The following code explains how to convert OneNote file to a PNG image programmatically with Java:

OneNote File to Grayscale TIFF Image Conversion in Java

You can convert .one files to image format while specifying the color modes as per your requirements. Please follow the following steps to convert a OneNote file to Grayscale TIFF image:

  1. Load the OneNote file using Document class.
  2. Initialize ImageSaveOptions and specify SaveFormat.
  3. Set color mode for GrayScale TIFF output.
  4. Save output image.

The code below demonstrates how to convert a .ONE file to a TIFF image with GrayScale color scheme programmatically using Java:

Convert OneNote to TIFF in Black and White Color with Compression using Java

Several compression algorithms are supported by the API and you can convert the OneNote file to black and white tiff image with compression using Java. You need to follow the steps below for converting the .one file to TIFF image:

  1. Load the note file using Document class.
  2. Initialize ImageSaveOptions and SaveFormat objects.
  3. Set ColorMode to Black and White.
  4. Set the compression type specific for the Black and White image.
  5. Finally, save the output TIFF file.

The following code explains how to convert a .ONE file to a black and white TIFF image programmatically with Java:

Get Free API License

You can request a Free Temporary License to test the API in full capacity.

Conclusion

In conclusion, you have learned how to convert OneNote files (.one) to different image formats like PNG, JPG, and TIFF with different color modes and compression algorithms programmatically using Java. Moreover, please take a look at API Documentation to explore other features. In case of any questions, please feel free to reach out to us at the Free Support Forum.

See Also