effect-motion
API ReferenceexportNamespacesStillsFunctions

downscale

function downscale(

Function: downscale()

function downscale(
   rgba,
   width,
   height,
   maxWidth): {
  height: number;
  rgba: Uint8Array;
  width: number;
};

Defined in: packages/export/src/Stills.ts:211

Box-downscale an RGBA image to at most maxWidth wide, keeping aspect. Returns the input untouched when it already fits. Pure.

Parameters

ParameterType
rgbaUint8Array
widthnumber
heightnumber
maxWidthnumber

Returns

{
  height: number;
  rgba: Uint8Array;
  width: number;
}

height

height: number;

rgba

rgba: Uint8Array;

width

width: number;

On this page