How to mass convert BMP to JPG (Tutorial)
IDRSolutions

IDRSolutions @idrsolutions

About: Helping Developers to work with PDF Documents since 1999

Location:
United Kingdom
Joined:
Apr 23, 2025

How to mass convert BMP to JPG (Tutorial)

Publish Date: May 7
0 0

BMP (Bitmap) is a raster graphics format known for its simplicity and compatibility. It stores image data in an uncompressed format, resulting in large file sizes.

BMP images are commonly used in Windows environments and supported by various software applications. Converting BMP images to JPG can significantly reduce file size, making them easier to store and share while maintaining reasonable image quality.

In this article, I’ll guide you through the process of using Java to convert BMP files to JPG format with JDeli, ensuring your images are accessible. JDeli is the best Java image library for enterprise applications.

Mass convert BMP to JPG using Java

  1. Download the JDeli trial jar.
  2. Process image if needed (scale, sharpen, lighten, watermark, etc)
  3. Write out BufferedImage as JPG image file
BufferedImage bufferedImage = JDeli.read(new File("bmpImageFile.bmp"));
// Read BMP image into Java

bufferedImage = operations.apply(BufferedImage bufferedImage);
// Process BMP image (Optional)

JDeli.write(bufferedImage, "jpg", new File("jpgImageFile.jpg"));
// Write out BufferedImage as JPEG image file
Enter fullscreen mode Exit fullscreen mode

Export BMP to JPG in one line of code

With the JDeli.convert() method you can save BMP as JPG in just one line of code.

Using File

JDeli.convert(File inFile, File outFile);
Enter fullscreen mode Exit fullscreen mode

Using InputStream and OutputStream

JDeli.convert(InputStream inputStream, OutputStream outputStream, "jpg");
Enter fullscreen mode Exit fullscreen mode

Using byte[]

byte[] outputData = JDeli.convert(byte[] inputData, "jpg");
Enter fullscreen mode Exit fullscreen mode

Configure Output Settings

You can configure output settings, such as image compression, by specifying an [EncoderOptions](https://files.idrsolutions.com/maven/site/jdeli/apidocs/com/idrsolutions/image/jpeg/options/JpegEncoderOptions.html?mtm_campaign=devto) object with this option.

JDeli.convert(File inFile, EncoderOptions outputOptions, File outfile);
Enter fullscreen mode Exit fullscreen mode

How to bulk convert BMP to JPG from the command line

You can use command line or bash, bat, and PowerShell scripts to mass convert BMP to JPG. This method also allows you to invoke JDeli from any programming language that supports creating a child process.

java -jar jdeli.jar –convert jpg "inputFileOrDir" "outputDir"
Enter fullscreen mode Exit fullscreen mode

JDeli is a pure Java library with BMP support. In this tutorial you learned how to bulk convert BMP to JPG, take a look at our support site for more format conversions.

Comments 0 total

    Add comment