I need to get the format type for a each image in a folder and then change the format to a different type and then merge them. My problem is that I dont know how to get the type from an Image. I have googled it and found nothing really to what I need and I dont know if I understand it correctly. Can someone help me by guiding me in the right direction? Or some pointers?
Well, there are hundreds of different graphics file formats. And the only way to tell whether a particular file belongs to one of those hundreds of formats is to look at the bytes of the file and see if those bytes match the rules for the format in question.
As you can imagine this isn't an easy task. For example here's a link to what I think is the TIFF specs -- I got that from a link on the Wikipedia page about TIFF, Tagged Image File Format. That document tells you how to arrange the bytes in a file so that they represent a TIFF document, and you should then be able to use the document when you look at a file, to see if its bytes match the rules in that document.
So that's one format. If you have other formats you want to recognize, you're going to have to track down the specs for them as well.