YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.sendspin.session.ArtworkLayout Class Reference

Where a source image goes in an artwork channel (spec, "Artwork messages"): scaled to fit within the declared width and height, keeping its aspect ratio, centred, the rest padded with black, never cropped. More...

Collaboration diagram for de.yaacc.sendspin.session.ArtworkLayout:
Collaboration graph

Static Public Member Functions

static ArtworkLayout fit (int sourceWidth, int sourceHeight, int targetWidth, int targetHeight)
 

Public Attributes

final int width
 
final int height
 
final int x
 
final int y
 

Detailed Description

Where a source image goes in an artwork channel (spec, "Artwork messages"): scaled to fit within the declared width and height, keeping its aspect ratio, centred, the rest padded with black, never cropped.

Pure arithmetic; the bitmap work is the encoder's.

Member Function Documentation

◆ fit()

static ArtworkLayout de.yaacc.sendspin.session.ArtworkLayout.fit ( int sourceWidth,
int sourceHeight,
int targetWidth,
int targetHeight )
static
Returns
the size of the scaled image and its top left corner inside the targetWidth by targetHeight channel

The documentation for this class was generated from the following file: