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

x/imagescript/mod.ts>Image#contain

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

Resizes the image so it is contained in the given bounding box. Can return an image with one axis smaller than the given bounding box.

Parameters

width

The width of the bounding box

height

The height of the bounding box

optional
mode = [UNSUPPORTED]