How do I know how many pixels per inch my photo is?
Calculating PPI The basic equation for calculating PPI is: PPI = width(pixels)/ width of image (inches); PPI = height(pixels)/ height of image (inches).
How are pixel values calculated?
We can do this via the following formula: Assume a window or image with a given WIDTH and HEIGHT. We then know the pixel array has a total number of elements equaling WIDTH * HEIGHT. For any given X, Y point in the window, the location in our 1 dimensional pixel array is: LOCATION = X + Y*WIDTH.