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...
|
| static ArtworkLayout | fit (int sourceWidth, int sourceHeight, int targetWidth, int targetHeight) |
| |
|
|
final int | width |
| |
|
final int | height |
| |
|
final int | x |
| |
|
final int | y |
| |
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.
◆ 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:
- /github/workspace/yaacc/src/main/java/de/yaacc/sendspin/session/ArtworkLayout.java