How is the dpi calculated for images the user uploads into an interactive designer template?

The image quality is calculated by the comparison of the original pixel size of the uploaded to the size (in inches) of the field it is being added to.
1)  We take the original pixel height of the image uploaded and divide it by the height in inches of the field selected to get a height DPI.
Uploaded image = 500px height, Field = 2in height,
500/2, DPI = 250
2)  We then do the same for the width of the image uploaded.
Uploaded image = 400px width, Field = 2in width,
400/2DPI = 200
3)  Then we compare which dpi is smaller.  In our example the dpi would be 200dpi.
This then is the effective DPI used to determine where this uploaded image lies within the quality ranges set.

If we had set our template's DPI ranges for Good, Acceptable and Poor to 300, 200, 100 respectively, then this uploaded image would be considered Acceptable.