Java: Detect if image isGIF or isTIFF and convert to JPG
- by BoDiE2003
I have a Java website, now Ive build an uploader, the validation for JPG images is done and a way to save it into the server it is too.
But now I need to create an utility class using isGIF and isTIFF validated them by byte[] and convert that byte[] to java.awt.Image to save as JPG
So basically I need boolean isGIF(byte[]), boolean isTIFF(byte[]), java.awt.Image convertGIF(byte[]) and java.awt.Image convertTIFF(byte[]).
But I have no idea how to do it, could someone help me please?
Thank you!