import { Image } from "https://deno.land/x/imagescript@1.2.15/mod.ts";
Represents an image; provides utility functions
Methods
__apply__(image)
__check_boundaries__(x, y)
__crop__()
x,
y,
width,
height,
__fast_box__()
x,
y,
width,
height,
color,
__resize__()
width,
height,
mode?,
__resize_nearest_neighbor__(width, height)
__set_channel_value__()
value,
absolute,
offset,
__set_pixel__()
x,
y,
pixelColor,
composite()
source,
x?,
y?,
Composites (overlays) the source onto this image at the specified coordinates
contain()
width,
height,
mode?,
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.
cover()
width,
height,
mode?,
Resizes the image so it covers the given bounding box, cropping the overflowing edges. Always returns the exact dimensions of the bounding box.
fisheye(radius?)
fit()
width,
height,
mode?,
Resizes the image so it is contained in the given bounding box, placing it in the center of the given bounding box. Always returns the exact dimensions of the bounding box.
resize()
width,
height,
mode?,
Resizes the image to the given dimensions. Use Image.RESIZE_AUTO as either width or height to automatically preserve the aspect ratio.
toString()
Static Methods
__gradient__(startColor, endColor)