OptionalbackgroundFills whatever a pad or a rotation leaves empty.
OptionalblurGaussian blur radius in pixels.
OptionalbrightnessScales every channel. 1 is unchanged.
OptionalbudgetA CPU budget in milliseconds, which changes what format: 'auto' chooses.
The Workers Free plan allows 10 milliseconds of CPU per request and it is not configurable, so a request either fits or fails; there is no paying slightly more. Give a budget below the limit rather than at it, since the estimate behind the choice is accurate to about 20%.
An explicitly named format is never substituted, however far over budget it is: naming one
is a decision, and this option does not overrule it.
OptionalcontrastScales every channel about mid gray. 1 is unchanged.
OptionalcropSource rectangle, taken before anything else.
OptionaldprMultiplies width and height, for serving a retina variant of one request.
OptionaleffortHow much computation the encoder may spend. 'fancy' is the default.
A separate axis from TransformOptions.quality: quality says what the output should
look like, this says how hard to work to get there. See the effort option on
Image.bytes for what each format gives up and what it was measured to cost.
OptionalfilterWeights the resample reads through. auto is an area average down and a cubic up.
OptionalfitHow an aspect mismatch is absorbed. Only read when both width and height are set.
OptionalflipWhich axes to mirror.
OptionalformatContainer to encode as. Defaults to the source's own format.
'auto' picks one. On its own that is WebP, which is the better artifact. With
TransformOptions.budgetMs it becomes the best format that fits the budget, which
matters because the encoders differ by about a factor of five per sample.
OptionalgammaRaises every channel to a power. 1 is unchanged.
OptionalgravityWhich part a crop keeps, or where a pad puts the image.
OptionalgrayscaleReplaces every channel with the pixel's luminance.
OptionalheightTarget height in pixels. With width unset, the aspect ratio is kept.
OptionalhueRotates the hue, in degrees.
OptionalinvertSubtracts every channel from full scale, leaving alpha alone.
OptionallosslessUse a format's lossless mode where it has one.
OptionalmetadataWhether to carry EXIF and other metadata into the output. Defaults to keep.
OptionalprogressiveWrite a progressive or interlaced stream.
OptionalqualityQuality for a lossy format, 1 through 100.
OptionalrotateQuarter turns clockwise. Anything else is rejected; use Image.rotateFree.
OptionalsaturationMoves every channel toward or away from its luminance. 1 is unchanged.
OptionalsharpenUnsharp mask amount.
OptionaltrimTrims a uniform border, at this tolerance. true means a tolerance of 8.
OptionalwidthTarget width in pixels. With height unset, the aspect ratio is kept.
Everything a one-shot transformation can ask for.
Every field is optional and an empty object is a valid request: it decodes and re-encodes. The order the operations run in is fixed and documented on transform, because an option object has no order of its own and two callers writing the same keys have to get the same image.