Mobile app version of vmapp.org
Login or Join
Merenda852

: How to show the dimensions of a document as a ratio When we are using Image size window, width and height is displayed in percentage, pixel, inches etc. I need to get a pop up window showing

@Merenda852

Posted in: #AdobePhotoshop

When we are using Image size window, width and height is displayed in percentage, pixel, inches etc. I need to get a pop up window showing the dimension of the document in ratios. Is this possible?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Merenda852

2 Comments

Sorted by latest first Latest Oldest Best

 

@Yeniel278

Here is a quick script that will calculate the ratio of the currently open document:
#target photoshop
var doc = app.activeDocument;

var ratio = reduce(doc.width.value, doc.height.value);
alert(ratio[0]+':'+ratio[1])

// by Phrogz see:
// stackoverflow.com/questions/4652468/ function reduce(numerator,denominator){
var gcd = function gcd(a,b){
return b ? gcd(b, a%b) : a;
};
gcd = gcd(numerator,denominator);
return [numerator/gcd, denominator/gcd];
}

10% popularity Vote Up Vote Down


 

@Michele215

1) If you are refering to internal ratio between width and height.

A ratio is not a size... it is a ratio, a relation between two mesures.

You want a photo 3:2 ratio. Is it 3x2px or 3000x2000px?

To change size of an image a crop could be needed, so it is a diferent decision you need to make.

So basicly: no.



Edited: The way arround is to do the math yourself.

Look at the image dimensions, for example 3000x2000px
and divide one number with the other.

In this case the aspect ratio will be 1.5. This is a way to define the aspect ratio. Here is a table of the ratios found in this page: en.wikipedia.org/wiki/Display_resolution#/media/File:Vector_Video_Standards8.svg

5:4=1.25
4:3=1.33
3:2=1.5
8:5=1.6
16:9=1.77
5:3=1.66
17:9=1.88
21:9=2.33


2) If you are refering to a scale

Meaning "this photo should be half of the original" 1:2

The idea its the same as percentage. Do some math:
100%/2= 50%

1:10 = 100%/10=10%.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme