Showing posts with label videos. Show all posts
Showing posts with label videos. Show all posts

Sunday, 19 June 2016

Microsoft Excel: Calculating Aspect Ratios

You have downloaded a video file from internet (hopefully legally) and when you play it, something just doesn’t feel right; the picture looks squished (basketball athletes look short) or stretched (supermodels look plus-sized models). You want to know the video’s aspect ratio and compare to what it should be from the looks of it. Most players will readily tell you the resolution of a video but finding its aspect ratio can be tricky if not impossible. Sometimes the information given is just not reliable.

You can reliably calculate any video’s aspect ratio – provided that you already know its resolution – by using following formula in Microsoft Excel:

=A2/GCD($A$2,$B$2)

Or

=A2/GCD($A$2:$B$2)

The only difference between these two formulas is that the first one uses references to individual cells as indicated by comma and the second one uses a range of cells as indicated by the colon character. In each case, refernces include only two cells, A2 and B2. A2 contains width of the video and B2 contains its height.

How to Use

Let us say you have a small video with a resolution of 320x240 which means its height is 320 pixels and height is 240 pixels. You want to calculate aspect ration of this video. First look at following screen capture:


Start a new work sheet. Just like in the picture above, type 320 in A2 and 240 in B2.

In A3, type =A2/GCD($A$2,$B$2) and press Enter. Click on A3, copy this cell in B3. In formula bar, the formula will look like =B2/GCD($A$2,$B$2). If you notice only one reference was updated in the formula, that is B2. It is because $ sign in a reference makes it absolute and tells Excel not to change it when the formula containing it is copied.

In above example, aspect ratio of your video is 4:3 or 1.33:1 if you divide both numbers by 3.

Here is another example:


Try doing it yourself and use =A2/GCD($A$2:$B$2) for this example. Here, too, the aspect ratio is 4:3.

Non-standard Aspect Ratio

Poorly processed videos, and most pictures and photographs available online have non-standard aspect ratios like in following example:


As per above calculation a video or a picture with resolution of 854x480 has an aspect ratio of 427:240 or 1.78:1 if you divide both numbers by 240.

Desktop Wallpapers

Sometimes you download or take a really nice picture and you want to use it as your desktop wallpaper. You know that your operating system will stretch or shrink the image to fit it on your desktop, however, if the aspect ratio of the picture is not same as your monitor, it will look squished or stretched. To find out beforehand if the photograph that you want to use is appropriate for your monitor you can use same techniques in Excel described above. Let us look at an example:



In this hypothetical scenario, we have photograph with resolution 5312x2988. Such resolutions are common in modern digital photography. In this example, the computer user still has an old CRT monitor with 1024x768 resolution. Using above formulas, the user finds out that the picture has modern wide-screen aspect ratio of 16:9 and his monitor is 4:3, which means he must crop the photograph to make it look decent on his desktop. In other words, before using a picture as a wallpaper for your desktop, make sure that its aspect ratio is exactly the same as your monitor. Pictures of equal and larger resolution than that of your monitor make better wallpapers with crisper edges and tones, however, if their aspect ratios do not match your monitor the results can be a bit unsightly.

Simpler Calculation: Ratios with Decimals

There is a much simpler way of calculating aspect ratios which can be done with any hand-held electronic calculator as well as Microsoft Excel. Let us take two resolutions from last example above. In each of 5312x2988 and 1024x768 divide each number on both sides of x with smaller of the two. For example, in 5312x2988 divide both 5312 and 2988 by 2988 – smaller of the two – to get 1.78:1. You can get same result by dividing both sides of 16:9 by 9. Similarly, with 1024x768 and 4:3, you get 1.33:1.

Despite these ratios with decimals are easier to calculate and more readily referred to in many technical literatures, they are not easily understood by most people as decimal numbers are not strong suite for them, or these numbers are not as straight-forward as ratios involving integers only. Personally, I prefer non-decimal (integer) ratios over decimal ratios.

Thursday, 8 January 2009

Israel and Anti-Semitism

Since the start of recent Israeli attacks on Gaza, I couldn't help but think why is West so adamant in supporting Israel and its "right to exist", against all reasons and logics or any political or diplomatic morality.
Right to Exist; it is a loaded phrase with multi-faceted explanation. The very use of the phrase "right to exist" implies that, although, the user of these three words knows that the existence of Israel is inherently wrong and illegal, however, s/he should support its existence to maintain status quo. Another explanation that entails its use is that the user of the phrase is saying, "Now that Israel has emerged on earth's map and we are not able to falsify this reality, although we don't like it, we will have to accept its existence and accept that Israel has raised its stakes so high which cannot be competed in order to diminish it."
Any student of history with a keen eye on the background of creation of this Jewish state knows that its creation was both morally and legally wrong, although many wouldn't admit it.
The question still remains unanswered: "Why is West so adamant in supporting Israel and its 'right to exist'?"
One explanation is the anti-Semitism in West which reached its culmination in the form of Hitler's Nazi ideology. West knows that cooking Jews like Hitler is no more an option; therefore, only workable way of getting rid of them is to send them some place where they would be more than happy to go and stay. Hence, the existence of Israel and its support. In my opinion, the very notion of supporting Israel is in itself deeply and inherently anti-Semitic. Many supporters of this country equate supporting Israel with supporting Jews, which is also a very misguided notion. Israel is the creation of a group of people comprised of Jews and Christians which completely ignored the war crimes against Jewish people in WWII. They had their own agenda and that was not the well being of Jewish people. Their agenda was to benefit a select group of people which did not represent all Jewish but a subgroup of Jews with extremist militant inclination called Zionists.
Flag waving support for Israel in West is instrumental in drawing idealistic picture of Israel as a land of Jews among young Jewish population. Engraving a utopian depiction of Israel in the young Jewish minds is essential to make sure that these young boys and girls will easily be brain washed into leaving West to permanently settle in Israel. The feud of Palestinians and other Middle Eastern countries with Israel is understandable as they have lost an entire country to aliens and they are left with two strips of land with overly congested population living in same conditions as Jews in European ghettos. When some misguided Arabs launch a couple of mostly ill-aimed rockets which land in Israel, they are not hurting Israeli people. They are hurting that utopian picture of Israel that is depicted for Jews living in West and the utopian ideology is to be protected at any cost even if it means obliterating the rest of Palestine.
Believe it or not, Israel is the foremost cause of anti-Semitism around the world. This country has done more harm than good for Jews. If you study the history of Jews, you will notice that they were one of the most oppressed people in Europe. Historically, whenever Jews suffered and were kicked out of their homes and land, the only place they found refuge and which served as sanctuary for them for centuries was Muslim empire. Many would argue against Muslims not giving Jews share in government or powerful government positions. That maybe so, however, there was no bar on Jews from getting into non-political or non-governmental jobs and they actually prospered under Muslim rulers. Others might argue about the status of Jews. It must be understood that every country has its laws and its citizens must abide by them if they want to live in that country. Laws in parts of Muslim empire required all non-Muslims to pay a certain protection tax which included Jews. It must be mentioned, however, that Jews and Christians enjoyed better status compared to other non-Muslims because they were (and still are) people of the book, followers of Islamic prophets. Muslim governments never discriminated against Jews and treated them same as any other non-Muslim citizens. Anti-Semitism in Muslim empire was non existent.
Now that same Muslim empire has divided into many countries and almost all of these countries have unfriendly stance towards Jews as they see them as the representatives of Israel, an oppressor which has captured Muslim land illegally and kills and is still killing thousands of Muslims.
History is the witness; there was zero anti-Semitism in Muslim countries before the creation of Israel. Now they are topping the list of anti-Jewish countries. Who is to blame?
In USA, conservative ideologists are the strongest supporters of Israel. Southern USA is famous for being conservative and following two videos are evidence of anti-Semitism in USA which is often not expressed as it is considered politically wrong: