Skip to main content
Module

x/imagescript/ImageScript.js>Image#cover

zero-dependency JavaScript image manipulation
Extremely Popular
Go to Latest
method Image.prototype.cover
import { Image } from "https://deno.land/x/imagescript@1.2.15/ImageScript.js";

Resizes the image so it covers the given bounding box, cropping the overflowing edges. Always returns the exact dimensions of the bounding box.

Parameters

width

The width of the bounding box

height

The height of the bounding box

optional
mode = [UNSUPPORTED]

The resizing mode to use