Search code examples
javaimage-conversion

How to convert images with following extensions jpg, pdf, gif, xls, xlsx, doc, docx, rtf, bmp, jpeg, csv to .TIFF in java?


How to convert images with following extensions jpg, pdf, gif, xls, xlsx, doc, docx, rtf, bmp, jpeg, csv to .TIFF in Java ?

I want to convert all the above mentioned image extensions to .TIFF extension.


Solution

  • Apache Commons Sanselan has support for reading and writing BMP, JPEG/JFIF, TIFF, GIF and PNG from your list.

    Apache PDFBox can convert PDF files to images (see PDFToImage code).

    Apache POI can read doc, docx, xls and xlsx, but I am not aware of an easy way to convert them to an image (if that is what you would want to do). What you could probably do is make a conversion to a PDF first and then from PDF to an image.