In this tutorial, you’ll learn how to convert BMP to JPG with Java REST API. BMP (Bitmap) is an image file format used to store bitmap digital images, especially on Microsoft Windows and OS/2 operating systems. The file format can store 2D digital images of up to 10,000 x 10,000 pixels in 24-bit RGB color, which allows for up to 16.7 million colors. The BMP file format is one of the oldest image formats used today, and is widely used for simple image manipulation, such as resizing, cropping, and converting to other image formats.
Whereas, JPG or JPEG stands for Joint Photographic Experts Group and is a type of image file format. It is a popular choice for storing digital photographs due to its small file size and high image quality. JPG files are highly compressed and typically used for web graphics and other online images. If you require BMP to JPG Conversion in Java Low Code API then the same can be performed with the help of the following sample.
Prerequisite
- Create account and get API credentials
- Download Aspose.Imaging Cloud SDK for Java
- Setup Java project with the above SDK
Steps to Convert BMP to JPG in Java REST API
- Set Client ID and Client Secret for the API
- Create an instance of ImagingAPI class with client credentials
- Specify input and output files
- Read input BMP file and upload to cloud storage
- Create an object of ConvertImageRequest with input and output file formats
- Call convertImage method to Convert BMP to JPG using REST API
- Save the output JPG file on local disk
Code for BMP to JPG Conversion in Java Low Code API
The code given above empowers you to convert BMP to JPG with Java REST API. You just need to supply BMP file with the help of the Aspose.Imaging REST API SDK and download output JPG file to save it locally.
This BMP to JPG Conversion can be consumed with any no code or low code apps on Windows, Linux, or Mac.
A similar feature can be found in the following topic: How to Convert BMP to PDF with Java REST API