HP Forums

Full Version: (35S) Photo resolution from MPixels and aspect ratio
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
For those of us who engaged in photography, we sometimes want to find the horizontal and vertical resolution of a sensor from the Megapixels (P) and aspect ratio (R). The following program uses only the stack (Y=Megapixels, X=Ratio) and the answer returned to X=Horizontal res. and Y=Vertical res.
The program is based on the formulas:HRes=SQRT(P*R), YRES=SQRT(P/R).

Code:
P001    LBL P
P002    ENTER
P003    ENTER
P004    REGT
P005    *
P006    SQRT
P007    RDN
P008    /
P009    SQRT
P010    ENTER
P011    REGT
P012    X<>Y
P013    RTN
Reference URL's