JDeli can read and write images as JPG format files, providing a complete JPG converter between JPG and lots of other image file formats.
You can do this in A SINGLE step with the convert method or separately read and write the image if you want to process the image in Java.
Convert images to JPG from Command Line or another language
java -jar jdeli.jar --convert jpg "inputFileOrDir" "outputDir"
Convert to or from a JPG image in Java
JDeli.convert(File inFile, File outFile);
JDeli.convert(InputStream inFile, OutputStream outfile, String format);
byte outputData=JDeli.convert(byte inputData, String format);
An additional set of methods allow values to be passed in which can give more control over conversion, depending on the image formats being converted (ie different image compression options).
Multiple steps method to change from a JPG or into a JPG image
2. Process image