Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/imagescript/ImageScript.js>Image#contain

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

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]

The resizing mode to use