UNPKG

@canvacord/beta

Version:

Simple & easy to use image manipulation module for beginners.

25 lines (24 loc) 1.37 kB
/// <reference types="node" /> import { ImageSource, SketchConstructorOptions } from '../types/globalTypes'; import { SKRSContext2D, Canvas as SkCanvas } from '@napi-rs/canvas'; /** * Basic photo editing */ export declare class Photoshop { constructor(); static blur(image: ImageSource, pixels?: number): Promise<Buffer>; static brighten(img: ImageSource, amount?: number): Promise<Buffer>; static darken(img: ImageSource, amount?: number): Promise<Buffer>; static greyscale(img: ImageSource): Promise<Buffer>; static grayscale(img: ImageSource): Promise<Buffer>; static invert(img: ImageSource): Promise<Buffer>; static sepia(img: ImageSource): Promise<Buffer>; static threshold(img: ImageSource, amount: number): Promise<Buffer>; static circle(image: ImageSource): Promise<Buffer>; static convolute(ctx: SKRSContext2D, canvas: SkCanvas, matrix: number[], opaque?: boolean): Promise<SKRSContext2D>; static colorfy(image: ImageSource, color: string): Promise<Buffer>; static colourfy(image: ImageSource, colour: string): Promise<Buffer>; static color(color: string, width: number, height: number): Promise<Buffer>; static colour(colour: string, width: number, height: number): Promise<Buffer>; static sketch(image: ImageSource, options?: SketchConstructorOptions): Promise<Buffer>; }