Files
plexjs/docs/models/operations/transcodeimagerequest.md

53 KiB
Raw Permalink Blame History

TranscodeImageRequest

Example Usage

import { TranscodeImageRequest } from "@lukehagar/plexjs/models/operations";
import { BoolInt } from "@lukehagar/plexjs/models/shared";

let value: TranscodeImageRequest = {
  url: "/library/metadata/265/thumb/1715112705",
  background: "#ff5522",
  upscale: BoolInt.True,
  minSize: BoolInt.True,
  rotate: BoolInt.True,
  blendColor: "#ff5522",
};

Fields

Field Type Required Description Example
accepts shared.Accepts Indicates the client accepts the indicated media types
clientIdentifier string An opaque identifier unique to the client abc123
product string The name of the client product Plex for Roku
version string The version of the client application 2.4.1
platform string The platform of the client Roku
platformVersion string The version of the platform 4.3 build 1057
device string A relatively friendly name for the client device Roku 3
model string A potentially less friendly identifier for the device model 4200X
deviceVendor string The device vendor Roku
deviceName string A friendly name for the client Living Room TV
marketplace string The marketplace on which the client application is distributed googlePlay
url string The source URL for the image to transcode. Note, if this URL requires a token such as X-Plex-Token, it should be given as a query parameter to this url. /library/metadata/265/thumb/1715112705
format operations.Format The output format for the image; defaults to jpg
width number The desired width of the output image
height number The desired height of the output image
quality number The desired quality of the output. -1 means the highest quality. Defaults to -1
background string The background color to apply before painting the image. Only really applicable if image has transparency. Defaults to none #ff5522
upscale shared.BoolInt Indicates if image should be upscaled to the desired width/height. Defaults to false 1
minSize shared.BoolInt Indicates if image should be scaled to fit the smaller dimension. By default (false) the image is scaled to fit within the width/height specified but if this parameter is true, it will allow overflowing one dimension to fit the other. Essentially it is making the width/height minimum sizes of the image or sizing the image to fill the entire width/height even if it overflows one dimension. 1
rotate shared.BoolInt Obey the rotation values specified in EXIF data. Defaults to true. 1
blur number Apply a blur to the image, Defaults to 0 (none)
saturation number Scale the image saturation by the specified percentage. Defaults to 100
opacity number Render the image at the specified opacity percentage. Defaults to 100
chromaSubsampling operations.ChromaSubsampling Use the specified chroma subsambling.
- 0: 411
- 1: 420
- 2: 422
- 3: 444
Defaults to 3 (444)
blendColor string The color to blend with the image. Defaults to none #ff5522