Login
Sign Up
Home
Program
Project
My Zone
Support
Show Code
Browse Program
Search Program
Pixels and Aspect Ratio Calculator
Input Variables
Output Variables
Program Code
Description
Variable Name *
(dynamic type)
*
!
UP
Down
Delete
Default Value *
*
Description *
*
Multi Lines
Variable Name *
(dynamic type)
*
!
UP
Down
Delete
Default Value *
*
Description *
*
Multi Lines
Variable Name *
(dynamic type)
*
UP
Down
Delete
Description *
*
Variable Name *
(dynamic type)
*
UP
Down
Delete
Description *
*
Input Variables List
Output Variables List
Source Code
pixels=a*b; a=a*1.0; //Convert To float type if (a>=b) { ratio = string.Format("{0:F2}", a/b)+":1"; } else { ratio = "1:"+string.Format("{0:F2}", b/a); }
Subject
Description
Calculates the aspect ratio and number of pixels in an image.
Formula to find Aspect Ratio:
Ratio=a/b
Pixels=a*b
where,
a = Width of the image
b = Height of the image
Category
General
Created By
tech
Created Date
11/23/2010
Last Modify Date
11/23/2010
Calculation Count
8
Version
1.00
Positive
0
Neutral
0
Negative
0
Related Program ID
20 , 22 , 23
Copyright ©2009-2010 CUI WEI. All Rights Reserved.