This page temporarily redirects to gemini://blekksprut.net/aspeq/.

aspeq

aspeq finds the closest "standard" aspect ratio from an image file, or from relative or absolute dimensions (width and height)

defined ratios

command line

$ aspeq *.jpeg
1.66.jpeg: super16
1.77.jpeg: sixteen-nine
2.35.jpeg: cinemascope

$ aspeq -x 1.66.jpeg
1.66.jpeg: 5:3

go

package main

import (
  "fmt"
  "blekksprut.net/aspeq"
)

func main() {
  ratio := aspeq.Match(320, 240)
  fmt.Println(ratio.Xy()) // prints "4:3"

  ar, err := aspeq.FromImage("1.66.jpeg") // a 40:24 image
  if err != nil {
    panic(err)
  }
  fmt.Println(ar.Name) // prints "super16"
}
Proxy Information
Original URL
gemini://blekksprut.net/aspeq
Status Code
Success (20)
Meta
text/gemini; lang=en
Capsule Response Time
2723.819791 milliseconds
Gemini-to-HTML Time
0.476671 milliseconds

This content has been proxied by September (ba2dc).