Live data from Hacker News

Show HN: AspectRat.io – Aspect ratio calculator and device resolutions resource

aspectrat.io

21–30 of 34 posts

Re: Show HN: AspectRat.io – Aspect ratio calculator and device resolutions resource

#21

Not sure why make a whole website of this w := 1900 h := 1200 divisor := gcd(w, h) aspect := fmt.Sprintf("%d:%d", w/divisor, h/divisor) func gcd(x, y int64) int64 { for y != 0 { x, y = y, x%y } return x }

Worth mentioning that the page makes it explicit that it uses this library: https://github.com/ryanhefner/calculate-aspect-ratio/blob/ma...

Re: Show HN: AspectRat.io – Aspect ratio calculator and device resolutions resource

#22
post #17

Earlier quoted context omitted.

My 2008 Dell Studio 15 laptop :)

Also, I thinking that it could be handy to maybe default to the resolution/aspect ratio of the device visiting the page. Would that be handy?

Yeah, I like this idea. It's kind of what I was expecting before I visited the page.

Re: Show HN: AspectRat.io – Aspect ratio calculator and device resolutions resource

#23
Hey, good job.

I tend to look up aspect ratios frequently.

You went full on with a nice web page and domain name hack.

Add more devices (e.g. ipads etc.), video res (vga,etc.) and more mathematical constants like golden ratio, silver ratio , etc. and add an easy landscape/portrait toggle switch.

Re: Show HN: AspectRat.io – Aspect ratio calculator and device resolutions resource

#24
post #6

Earlier quoted context omitted.

He/she/it hasn't heard of 1920x1200 :) All those devices are 16:9 i think?

Yeah, I need to beef up the devices/resolutions listing. What device(s) have 1920x1200?

Might be nifty to just match the list of devices in Chrome Inspector ..?

Re: Show HN: AspectRat.io – Aspect ratio calculator and device resolutions resource

#25
post #7

Not sure why make a whole website of this w := 1900 h := 1200 divisor := gcd(w, h) aspect := fmt.Sprintf("%d:%d", w/divisor, h/divisor) func gcd(x, y int64) int64 { for y != 0 { x, y = y, x%y } return x }

Because my non-programmer friend can use a website, but not write a program.

This. I work in media. Just passed this along to a few designer friends, and even non-designers who work with magazine design teams and regularly have to translate images and resize/crop them for mobile and web.

edit: They're already happy to have it in their back pocket.

Re: Show HN: AspectRat.io – Aspect ratio calculator and device resolutions resource

#26

Hey, good job. I tend to look up aspect ratios frequently. You went full on with a nice web page and domain name hack. Add more devices (e.g. ipads etc.), video res (vga,etc.) and more mathematical constants like golden ratio, silver ratio , etc. and add an easy landscape/portrait toggle switch.

> Add more devices (e.g. ipads etc.), video res (vga,etc.) and more mathematical constants like golden ratio, silver ratio , etc. and add an easy landscape/portrait toggle switch.

I'd like to add: a specs dialog, maybe? Add DPI/HDPI info, recommended DPI for images, etc. Would make this a for-sure go-to.

Nice work!

Re: Show HN: AspectRat.io – Aspect ratio calculator and device resolutions resource

#27
post #5

Earlier quoted context omitted.

For responsive embeds I assume. Where the embedded ".inner" component scales it's height according to it's width.

Yeah, that was the intention. Good to use for placeholder styling until the image/video has loaded. And for things like responsive embeds/iframes.

Maybe add an "about" or "how do I use it?" button with a panel, or a second page in case anybody is confused?

Re: Show HN: AspectRat.io – Aspect ratio calculator and device resolutions resource

#28

Earlier quoted context omitted.

Yeah, I need to beef up the devices/resolutions listing. What device(s) have 1920x1200?

Might be nifty to just match the list of devices in Chrome Inspector ..?

I just looked at Responsive Design Mode in Firefox Developer Tools and they also have a list of 16 devices with resolutions (Chrome has 29). There is a lot of overlap in the two lists, but using those would tie into a common tool we use to view sites on different devices.

Re: Show HN: AspectRat.io – Aspect ratio calculator and device resolutions resource

#29

Earlier quoted context omitted.

Yeah, I need to beef up the devices/resolutions listing. What device(s) have 1920x1200?

Might be nifty to just match the list of devices in Chrome Inspector ..?

This may also be of interest .. https://stackoverflow.com/questions/30610143/why-does-google...

Re: Show HN: AspectRat.io – Aspect ratio calculator and device resolutions resource

#30

Hey, good job. I tend to look up aspect ratios frequently. You went full on with a nice web page and domain name hack. Add more devices (e.g. ipads etc.), video res (vga,etc.) and more mathematical constants like golden ratio, silver ratio , etc. and add an easy landscape/portrait toggle switch.

> Add more devices (e.g. ipads etc.), video res (vga,etc.) and more mathematical constants like golden ratio, silver ratio , etc. and add an easy landscape/portrait toggle switch. I'd like to add: a specs dialog, maybe? Add DPI/HDPI info, recommended DPI for images, etc. Would make this a for-sure go-to. Nice work!

Thanks! Yeah, definitely going to be adding more devices and common resolutions.
Post reply on HN