Convert TIFF to JPG using Java REST API

This short tutorial guides on how to convert TIFF to JPG using Java REST API. You will learn to transform the file format from TIF to JPG using Java REST Interface with a Java-based Cloud SDK. It shares details to achieve this transformation for the sake of reducing the file size and enhancing the compatibility and performance on multiple platforms.

Prerequisite

Steps to Convert a TIFF File to JPG using Java RESTful Service

  1. Instantiate the ImagingApi using the API endpoint, client ID, and secret
  2. Load the local TIFF image into a MemoryStream and upload it to the Cloud storage
  3. Instantiate the request object using the ConvertImageRequest() method with the input image and desired format
  4. Transform the image from the TIFF format to JPG format using the ConvertImage() format
  5. Save the converted image to the local disk

These steps declare the process of how to change a TIFF file to JPG using Java-based API. Commence the process by loading the source TIFF file into a MemoryStream and uploading it to a Cloud storage, creating the request object by defining the input file stream and desired format, and finally calling the ConvertImage() method to perform the transformation.

Code to Change TIF to JPG using Java RESTful Service

This code has demonstrated the process of changing the file from TIFF format to JPG using Java REST API. This code enables the photographer to shoot in TIFF for quality, and convert to JPG for sharing. It supports WEB developers to reduce bandwidth by changing the TIFF images to JPEG format.

This article has taught us to convert a TIFF file to a JPG. To apply different types of filters on images, refer to the article Apply filter on image using Java REST API.

 English