Namitha, I just had a look through the API documentation and I found this static method in the ImageIO class:
public static String getWriterFormatNames()
Returns an array of Strings listing all of the informal format names understood by the current set of registered writers.
Since your question is what informal name you should be using, I would suggest that running this method and finding out what it returns might give you some useful information. In general I would suggest that you read the documentation and try things that you don't understand. Waiting for strangers to write your code for you is going to be a slow process and you shouldn't rely on it.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop