Skip to main content

FreeToolCalculateAspectRatioResponse

ratiostring

Simplified ratio, e.g. 4:5. Decimal ratios stay as given.

decimalnumber

Width divided by height, 4 decimals.

widthinteger
heightinteger
rounding object | null

Set when the calculated side is not a whole number: which side, its exact value (2 decimals) and the rounded pixels returned.

sidestring

Possible values: [width, height]

exactnumber
roundedinteger
orientationstring

Possible values: [landscape, portrait, square]

matches object[]

Social media image presets with the same ratio, else the nearest.

  • Array [
  • networkstring

    Network key from getImageSizes (network_key).

    formatstring

    Format key from getImageSizes (format_key).

    widthinteger
    heightinteger
    ratiostring
    exactboolean

    False when no preset has the same ratio and these are the nearest.

  • ]
  • FreeToolCalculateAspectRatioResponse
    {
    "ratio": "string",
    "decimal": 0,
    "width": 0,
    "height": 0,
    "rounding": "Unknown Type: object,null",
    "orientation": "landscape",
    "matches": [
    {
    "network": "string",
    "format": "string",
    "width": 0,
    "height": 0,
    "ratio": "string",
    "exact": true
    }
    ]
    }