Question

In: Computer Science

I have a question pertaining to ruby on rails. I was wondering if there is a...

I have a question pertaining to ruby on rails. I was wondering if there is a way to set aspect ratios for different monitor sizes for images used on a page. Thanks for any help.

Solutions

Expert Solution

To set aspect ratios for the different monitor sizes for images used in the pages :

1) Responsivity & Images

- One safe solution for including images in your layouts is using a fix aspect ratio, e.g. for many years Instagram only allowed users to upload square images with a 1:1 aspect ratio and your photo grid screen still contains square images, it crops anything that is not a square.

2) Art direction

- Usually it’s handled by dynamic cropping — but what happens if the most important part of the image is off-center, e.g. if the rule of thirds was applied, and the subject of the image is placed at the intersection points nearer to the left or right side of the picture? In these cases, dynamic cropping might crop out the main subject. A possible solution is that you can identify focal points, and there are tools that include for instance face detection. So you can either address this issue by manually setting focal points, or there are solutions for automatic art direction (this is the specific term for this activity).

3) Screen resolution and pixel density

- A screen resolution refers to the number of pixels: how many pixels are displayed horizontally and vertically. Now, pixel density [Pixels per inch (PPI)] tells you how many pixels are displayed within a given area of the screen.

eg :

4) Raster and bitmap images

- Until this point I mainly talked about raster or bitmap images. You surely know the difference between raster and vector images, to put it really simply, vector images are based on mathematical calculations, so these are infinitely scalable. On the other hand, raster images are made of pixels, and not scalable infinitely. Also, a vector file has a smaller file size, so it’s better for performance. A commonly used format is SVG, that is stands for Scalable Vector Graphics. So in case of a logo, icons, illustrations you should apply SVGs, these are great for all screen resolutions and pixel densities.

5) Textual content and videos

- It is a good practice to specify a maximum length for each textual element. Other aspects include typographic choices, like fonts, font sizes, spacing. And in many cases, the textual content itself is also different for different viewport sizes, for example you might want to display only some short paragraphs on a mobile device, while on larger viewport sizes you might want to include longer stories.


Related Solutions

I have a 2 part practice question on Japan and wondering how I would answer it...
I have a 2 part practice question on Japan and wondering how I would answer it and what the actual answer is What type of policy interventions are likely given the country context - Monetary? / Fiscal? How exposed is the economy to internal shocks (eg. fluctuations in demand for money / regional shocks )
Hi, I have created the following code and I was wondering if it is possible to...
Hi, I have created the following code and I was wondering if it is possible to make an "if" statement in the first for loop that would output an error if the user enters a float, character or string? I was thinking of something along the lines of: if(a[i] != int) but that didn't work :( Thank you. #include <iostream> using namespace std; // Creating a constant for the number of integers in the array const int size = 10;...
I was wondering if I could get a step by step process to answer this question?
I was wondering if I could get a step by step process to answer this question?
I have done a fcff in excel and i was wondering how do i preform a...
I have done a fcff in excel and i was wondering how do i preform a sensitivity analysis with it. I did the FCFF but need help with the sensitivity analysis. Here is the question: You are thinking of investing $1000 in a machine today. It would be used to produce sales for 10 years. The projected sales number in year 1 is 1200, after which sales will grow at 2% annually. Cost of manufacturing for this project is 50%...
on question chapter 5 probl 46P, there is a regression answer, but I was wondering how...
on question chapter 5 probl 46P, there is a regression answer, but I was wondering how this was calculated with using what overhead costs and deliveries? the question states Your company provides a variety of delivery services. Management wants to know the volume of a particular delivery that would generate $10,000 per month in operating profits before taxes. The company charges $20 per delivery. The controller’s office has estimated overhead costs at $9,000 per month for fixed costs and $12...
Wondering if I am doing these calculations correctly I have a lab report due today. Questions...
Wondering if I am doing these calculations correctly I have a lab report due today. Questions Load P1 = 0 lb P2 = 350 lb P3 = 700 lb Gauge # Strain Stress Strain Stress Strain Stress 1 1102 724 383 2 1876 1546 1324 3 2177 2179 2181 4 876 1204 1558 5 662 989 1296 Sample Calculation: = s / e (10,600,000 psi)*1102 = 1.168 x 10^10 lb E = 10600 ksi = 10,600,000 psi
Question a) write short note                     1) Metro rails                 
Question a) write short note                     1) Metro rails                      2) Mono rails                   b)Causes of rail accidents and their remedial measures
These questions are what I have pertaining to The McDonalds' Coffee Case that happened in 1992....
These questions are what I have pertaining to The McDonalds' Coffee Case that happened in 1992. (Liebeck v. McDonalds) 1) what in good faith was McDonald's responsibility and the defendants? 2) whether McDonald's or the defendant breached their obligation? 3) what the cause of the situation was? 4) what remedy if any should have been given to the defendant?
hello, I was wondering if I can see an example of a statistics prop1ztest. and a...
hello, I was wondering if I can see an example of a statistics prop1ztest. and a bit more information about when to use it.
I am currently working on this problem. It says it is wrong, and I was wondering...
I am currently working on this problem. It says it is wrong, and I was wondering if someone could correct my code to where its ouput is as followed. Expected Output: 6↵ 5↵ 4↵ 3↵ 2↵ 1 Actual Output: 9↵ 8↵ 7↵ 6↵ 5↵ 4↵ 3↵ 2↵ 1↵ 0↵ 9.10: Reverse Array Write a function that accepts an int array and the array’s size as arguments. The function should create a copy of the array, except that the element values...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT