How can I give up properties like size, resolution , type and number of colors.

By the other word ; how can I read the header of an image file?

please send your answers with an example , if u can.

Tanx