A World File is a plain text (ASCII) file used by GIS software to georeference raster images. Small-scale rectangular raster image maps can have an associated World File for GIS map software which describes the location, scale and rotation of the map. These World Files are six-line files with decimal numbers on each line. The name of the file is modeled after the associated image file. The three letters of the image filename extension are altered thus: the second letter of the original filename extension is replaced with the last letter, and, the third letter is replaced with the letter "w." For example, the conventional World File extensions are .jgw, .gfw, .pgw, and .tfw for .jpg, .gif, .png, and .tif image types respectively.
The structure of a six-line World File is as follows:
Line 1: pixel size in the x-direction in map units
Line 2: rotation about y-axis
Line 3: rotation about x-axis
Line 4: pixel size in the y-direction in map units, almost always negative
Line 5: x-coordinate of the center of the upper left pixel
Line 6: y-coordinate of the center of the upper left pixel
The following is an example:
Notice that the pixel size in the y-direction is usually negative to compensate for the fact that image coordinates decrease from the top row toward the bottom (i.e. the top row is 0 and the bottom row is nRows). In most map coordinate systems, y-coordinates increase toward the north.