Amy Pearson Amy is a Java developer and member of the support team. Her main technical interests are JavaFX and Cloud. Out of hours she enjoys gaming and Virtual reality.

How to mass convert PNG to JPG (Tutorial)

1 min read

Mass conversion of PNG to JPG

Mass conversion of PNG to JPG
Handling a vast collection of PNG images? Converting them to JPG in bulk can be extremely beneficial, especially if you need JPGs for various purposes.

PNG (Portable Network Graphics) is a format known for its lossless compression and is widely used across various devices and platforms. Converting PNG images to JPG can significantly reduce file size, making them easier to store and share without compromising too much on quality.

In this article, I’ll guide you through the process of using Java to convert PNG files to JPG format with JDeli, ensuring your images are accessible.

Mass convert PNG 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

 

Export PNG to JPG in one line of code

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

Using File


Using InputStream and OutputStream

Using byte[]

Configure Output Settings
You can use this option to specify an EncoderOptions object for configuring output settings such as image compression.

 

How to bulk convert PNG to JPG from the command line

Mass convert PNG to JPG using command line or bash, bat, and PowerShell scripts. This method also enables JDeli to be invoked from any programming language that supports creating a child process.

In this tutorial you learned how to bulk convert PNG to JPG in bulk, for tutorials on more format conversions visit our support site.



Are you a Java Developer working with Image files?

Why do developers choose JDeli over free alternatives?

  1. Works with newer image formats such as AVIF, HEIC, JPEG XL, WEBP
  2. Better support than alternatives for JPEG, PNG, TIFF.
  3. Prevent JVM crashes caused by native code in other image libraries
  4. Better performance than other popular Java image libraries
Amy Pearson Amy is a Java developer and member of the support team. Her main technical interests are JavaFX and Cloud. Out of hours she enjoys gaming and Virtual reality.