YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.sendspin.control.ArtworkEncoder Interface Reference

Makes the image for an artwork channel (issue #325, K15): the cover at an address, scaled to fit the declared width and height, centred on black, encoded as JPEG or PNG (see ArtworkLayout). More...

Inheritance diagram for de.yaacc.sendspin.control.ArtworkEncoder:
Inheritance graph
Collaboration diagram for de.yaacc.sendspin.control.ArtworkEncoder:
Collaboration graph

Public Member Functions

byte[] encode (String url, String format, int width, int height) throws IOException
 

Detailed Description

Makes the image for an artwork channel (issue #325, K15): the cover at an address, scaled to fit the declared width and height, centred on black, encoded as JPEG or PNG (see ArtworkLayout).

The Android side does the bitmap work; the tests use a fake.

Member Function Documentation

◆ encode()

byte[] de.yaacc.sendspin.control.ArtworkEncoder.encode ( String url,
String format,
int width,
int height ) throws IOException
Parameters
format"jpeg" or "png"
Returns
the encoded image of exactly width by height, or null if there is none (not reachable, not an image, too big); may block, so it is called off the connection's thread
Exceptions
IOExceptionif the cover could not be read

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