JDeli is able to convert JPG to TIFF files.
JDeli can do this in ONE step with the convert method. You can also do this by reading a JPG image and then writing the image as TIFF, which is useful if you want to process the image in some way.
Convert any image to TIFF from Command Line or another language
java -jar jdeli.jar --convert tiff "inputFileOrDir" "outputDir"
Single step method to convert JPG to TIFF files in Java
JDeli.convert(File inFile, File outFile);
JDeli.convert(InputStream inFile, OutputStream outfile, String format);
byte outputData = JDeli.convert(byte inputData, String format);
Depending on the image formats being converted (ie set compression level in Tiff files), JDeli also provides overloaded methods. These can be used to supply conversion options for more control over the conversion process.
Read / Write methods to convert JPG to TIFF files in Java
1. Read JPG image into Java
BufferedImage image = JDeli.read(imageFile);
JpegDecoder decoder = new JpegDecoder();
BufferedImage image = decoder.read(imageData);
2. Process image
3. Write out Java image as TIFF
File myNewFile = new File("image.tif"); JDeli.write(image, "tif", myNewFile);
TiffEncoder encoder = new TiffEncoder();