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

x/imagescript/v2/framebuffer.d.ts>default

zero-dependency JavaScript image manipulation
Extremely Popular
Latest
class default
import { default } from "https://deno.land/x/imagescript@1.3.0/v2/framebuffer.d.ts";

Constructors

new
default(
width: number,
height: number,
buffer?: BufferSource,
)

Properties

private
readonly
view: DataView
readonly
height: number
readonly
u32: Uint32Array
readonly
u8: Uint8Array
readonly
width: number

Methods

at(x: number, y: number): Uint8Array
blur(type: "cubic"): this
blur(type: "box", radius: number): this
blur(type: "gaussian", radius: number): this
clone(): framebuffer
crop(type: "circle", feathering?: number): this
crop(
type: "box",
x: number,
y: number,
width: number,
height: number,
): this
cut(type: "circle", feathering?: number): this
cut(
type: "box",
x: number,
y: number,
width: number,
height: number,
): this
encode(format: "png", options?: { compression?:
| "none"
| "fast"
| "best"
| "default"
; }
): Uint8Array
fill(rgba: rgba): this
fill(color: Color): this
fill(color: number): this
fill(cb: (x: number, y: number) => number): this
flip(type: "vertical" | "horizontal"): this
get(x: number, y: number): number
overlay(
frame: this,
x?: number,
y?: number,
): this
pixels(type?: "int"): Generator<[number, number, number], [number, number, number]>
pixels(type: "rgba"): Generator<[number, number, Uint8Array], [number, number, Uint8Array]>
replace(
frame: this,
x?: number,
y?: number,
): this
resize(
type: "cubic" | "linear" | "nearest",
width: number,
height: number,
): this
rotate(deg: number, resize?: boolean): this
scale(type: "cubic" | "linear" | "nearest", factor: number): this
set(
x: number,
y: number,
color: number,
): void
swap(old: rgba, color: rgba): this
swap(old: Color, color: Color): this
swap(old: number, color: number): this
toJSON(): { width: number; height: number; buffer: number[]; }
toString(): string
[Symbol.iterator](): Generator<[number, number], [number, number]>

Static Methods

decode(format: "png", buffer: BufferSource): framebuffer
from(framebuffer: { width: number; height: number; u8?: BufferSource; buffer?: BufferSource; }): framebuffer