OptionalbackgroundOptionalcodecsCodec registrations that make non-canvas formats selectable via format.
OptionalconcurrencyMaximum items processed at once. Default 2.
OptionalcontinueDefault true: failures are collected as values. False: fail fast.
OptionalcropOptionalfallbackOptionalflipOptionalflipOptionalformatOutput format: a canvas MIME type ('image/jpeg' | 'image/png' |
'image/webp'), or the MIME type of a codec registered in
codecs. An unregistered non-canvas format fails with the
typed unsupported-format error - never a silent fallback.
OptionalmaxTarget-size mode: re-encode with descending quality (bounded binary
search) until the output is at most this many bytes. Lossy formats
only. When the budget cannot be met even at minimum quality, the
smallest best-effort result is returned and targetSizeMet is false.
OptionalonOptionalonOptionalperPer-item option overrides, merged over the shared options.
OptionalpluginsStep plugins. On a pipeline they run at their registered
position; in easy mode (processImage) they run in order
after the core pass (and before a registered codec encode).
Optionalquality0..1, default 0.85. Ignored for PNG (lossless).
OptionalresizeOptionalrotateDegrees clockwise. Any value; multiples of 90 are exact.
OptionalsignalOptionaltimeoutAbort the operation after this many milliseconds.
Fill colour used where rotation exposes corners and when flattening transparency for JPEG. Default
#fffffffor JPEG output, transparent otherwise. Set tonullto force transparency (non-JPEG only).