Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Climate] Identify set of common ad aspect-ratios #45

Closed
Tracked by #46
dhowe opened this issue Jan 8, 2022 · 4 comments
Closed
Tracked by #46

[Climate] Identify set of common ad aspect-ratios #45

dhowe opened this issue Jan 8, 2022 · 4 comments
Assignees
Milestone

Comments

@dhowe
Copy link
Owner

dhowe commented Jan 8, 2022

To replace our colored rectangles with random images from our image-set, we need a way to match the aspect ratio, then scale the image to the appropriate size for the ad rectangle on the page.

If we can identify a standard set of ad image ratios, then we can pre-select images for the image-set to match them...

@dhowe dhowe changed the title Identify set of common ad aspect-ratios [Climate] Identify set of common ad aspect-ratios Jan 8, 2022
@dhowe dhowe added this to the Climate milestone Jan 8, 2022
@Real-John-Cheung
Copy link
Collaborator

Real-John-Cheung commented Jan 9, 2022

I collected some ads with adnauseam and calculated their ratios

{
//'ratio':frequency
  '1.34': 1,
  '3.70': 1,
  '8.09': 8,
  '0.27': 3,
  '0.67': 1,
  '1.20': 12,
  '3.88': 3,
  '3.22': 1,
  '1.00': 4,
  '1.91': 2,
  '1.92': 1,
  '0.50': 1
}

Generally there are two kinds of them: banner-like (vertical & horizontal) and photo-like (landscape & portrait)
to simplify it below is the ratio of the longer side to the shorter side

  '1.34': 1,
  '3.70': 1,
  '8.09': 8,
  '3.75': 3,
  '1.50': 1,
  '1.20': 12,
  '3.88': 3,
  '3.22': 1,
  '1.00': 4,
  '1.91': 2,
  '1.92': 1,
  '2.00': 1

for photo-like ads most of the ratio are close to 4:3 , I think we can use 4:3 images for ads whose ratio are between 1 - 1.5.
a few ads have the ratio around 2:1
banner-like ads are more various... but many of their ratios are around 3.2 - 4, which is about 32:9
and some are in very strange shapes like 8:1, for those maybe we just ignore.

to concludes, I propose we prepare images 4 (4:3, 3:4, 32:9 and 9:32) to 6 (previous 4 plus 2:1 and 1:2) different ratios

@dhowe
Copy link
Owner Author

dhowe commented Jan 9, 2022

great -- let's see what we can find for these 6 ratios: 4:3, 3:4, 32:9, 9:32, 2:1, 1:2 (I'll make a new ticket)

would be good to know what the largest size for each is as we can always downscale

meantime, for your testing, perhaps just create the 6 with a single bright color

@Real-John-Cheung
Copy link
Collaborator

would be good to know what the largest size for each is as we can always downscale

The longest width/height is less than 1000px, so I think we can aim for images in this scale:
4:3 960x720
2:1 1000x500 or 800x400
32:9 1920x540

@dhowe
Copy link
Owner Author

dhowe commented Jan 10, 2022

see #49 for progress on collection

@dhowe dhowe closed this as completed Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants