LanczosLobes parameter for lanczos filter, valid for resizeType lanczos
Optional Private mainName of the parameter that can be changed in the filter. Some filters have more than one parameter and there is no mainParameter
Resize type for webgl resizeType is just lanczos, for canvas2d can be: bilinear, hermite, sliceHack, lanczos.
Scale factor for resizing, x axis
Scale factor for resizing, y axis
Private vertexArray of attributes to send with buffers. do not modify
Static defaultsStatic typeThe class type. Used to identify which class this is.
This is used for serialization purposes and internally it can be used
to identify classes. As a developer you could use instance of Class
but to avoid importing all the code and blocking tree shaking we try
to avoid doing that.
Filter type
Apply the resize filter to the image Determines whether to use WebGL or Canvas2D based on the options.webgl flag.
Apply this filter using webgl.
bilinearFiltering
Original Width
Original Height
Destination Width
Destination Height
If needed by a 2d filter, this functions can create an helper canvas to be used remember that options.targetCanvas is available for use till end of chain.
Compile this filter's shader program.
The GL canvas context to use for shader compilation.
fragmentShader source for compilation
vertexShader source for compilation
Return a map of attribute names to WebGLAttributeLocation objects.
The canvas context used to compile the shader program.
The shader program from which to take attribute locations.
A map of attribute names to attribute locations.
Return WebGL uniform locations for this filter's shader.
The GL canvas context used to compile this filter's shader.
This filter's compiled shader program.
hermiteFastResize
Original Width
Original Height
Destination Width
Destination Height
Filter lanczosResize
Original Width
Original Height
Destination Width
Destination Height
Retrieves the cached shader.
the compiled program shader
Send attribute data from this filter to its shader program on the GPU.
The canvas context used to compile the shader program.
A map of shader attribute names to their locations.
Send data from this filter to its shader program's uniforms.
The GL canvas context used to compile this filter's shader.
A map of string uniform names to WebGLUniformLocation objects
Filter sliceByTwo
Original Width
Original Height
Destination Width
Destination Height
Returns object representation of an instance
Object representation of an instance
Static fromGenerated using TypeDoc
Resize image filter class
Example