Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/imagescript/mod.ts>Image#cover

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

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]