Recently I got to work with GD library using PHP 5.xx and was little confused about pixels, resolution and how to convert them into physical dimensional measurement units like centimeters or inches.
I think, lots of people are still very confused about it but still work as developers in GUI or web development.
Here is some information......
Say, there is an image of a flower 400x300 pixels. It means that height of this image is 400 pixel and width is 300 pixels. With it, there must be one more attribute of screen called 'resolution' (Remember, your color TV resolution).
Say that is 72 ppi (pixel per inch).
Simple mathematics: 72 ppi means
72 pixels in 1 inch
Therefore, 400 pixels in = 400/72 = 5.55 inches tall
Therefore, 300 pixels in = 300/72 = 4.16 inches wide
Hope it clears the cloud.