Methods

(static) logoDisplaySize(width, height, limits, capHeight) → {object}

The size the logo is drawn at, from the size of the bitmap that loads.

A small logo is scaled up to limits.minHeight, keeping aspect, unless that would make it wider than limits.maxWidth: maxWidth is a hard layout bound, minHeight only a target. When capHeight is set, a tall image is then scaled down to limits.maxHeight so it stays clear of the text rows above it.

Parameters:
NameTypeDescription
widthinteger

the bitmap's width

heightinteger

the bitmap's height

limitsobject

{ minHeight, maxWidth, maxHeight }

capHeightboolean

whether limits.maxHeight applies

Returns:

{ width, height }, or invalid when either side is unknown (0)

Type: 
object

(static) serverFitSize(width, height, maxWidth, maxHeight) → {object}

The size the server sends for an image request bounded by maxWidth x maxHeight: scaled down to fit, aspect kept, never scaled up. Measured 2026-09-22 against Jellyfin 12.1: the served size is the scaled size ROUNDED to the nearest pixel (15 of 15 logos; truncating was a pixel short on 6 of them).

Parameters:
NameTypeDescription
widthinteger

the original image's width

heightinteger

the original image's height

maxWidthinteger

the request's maxWidth

maxHeightinteger

the request's maxHeight

Returns:

{ width, height }, or invalid when either original side is unknown (0)

Type: 
object