te recomiendo 2 paginas para buscar eso... se llaman google y wikipedia... te dejo los links de wikipedia para que revises
http://es.wikipedia.org/wiki/Portable_Network_GraphicsDetalles técnicos
Un archivo PNG empieza con una firma de 8 bytes, los valores en hexadecimal son: 89 50 4E 47 0D 0A 1A 0A, los valores decimales son: 137 80 78 71 13 10 26 10; cada valor está ahí por una razón específica.
http://en.wikipedia.org/wiki/JPEGA JPEG image consists of a sequence of segments, each beginning with a marker, each of which begins with a 0xFF byte followed by a byte indicating what kind of marker it is. Some markers consist of just those two bytes; others are followed by two bytes indicating the length of marker-specific payload data that follows. (The length includes the two bytes for the length, but not the two bytes for the marker.) Some markers are followed by entropy-coded data; the length of such a marker does not include the entropy-coded data. Note that consecutive 0xFF bytes are used as fill bytes for padding purposes, although this fill byte padding should only ever take place for markers immediately following entropy-coded scan data (see JPEG specification section B.1.1.2 and E.1.2 for details; specifically "In all cases where markers are appended after the compressed data, optional 0xFF fill bytes may precede the marker").
http://en.wikipedia.org/wiki/Graphics_Interchange_FormatGIF files start with a fixed-length header ("GIF87a" or "GIF89a") giving the version, followed by a fixed-length Logical Screen Descriptor giving the size and other characteristics of the logical screen. The screen descriptor may also specify the presence and size of a Global Color Table, which follows next if present.