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

x/lume/deps/imagick.ts>PixelCollection

🔥 Static site generator for Deno 🦕
Very Popular
Go to Latest
class PixelCollection
implements IPixelCollection
Re-export
import { PixelCollection } from "https://deno.land/x/lume@v1.16.1/deps/imagick.ts";

Constructors

new
private
PixelCollection(image: IMagickImage)

Properties

private
readonly
image: IMagickImage

Methods

private
use<TReturnType>(
x: number,
y: number,
width: number,
height: number,
mapping: string,
func: (instance: number) => TReturnType,
): TReturnType | null
getArea(
x: number,
y: number,
width: number,
height: number,
): quantumArray
getPixel(x: number, y: number): quantumArray
setArea(
x: number,
y: number,
width: number,
height: number,
quantumPixels: quantumArray,
): void
setArea(
x: number,
y: number,
width: number,
height: number,
numberPixels: number[],
): void
setPixel(
x: number,
y: number,
quantumPixels: quantumArray,
): void
setPixel(
x: number,
y: number,
numberPixels: number[],
): void
toByteArray(
x: number,
y: number,
width: number,
height: number,
mapping: string,
): quantumArray | null

Static Methods

private
createArray(
instance: number,
width: number,
height: number,
channelCount: number,
): quantumArray | null
_map(
image: IMagickImage,
mapping: string,
func: (instance: number) => void,
): void
_use<TReturnType>(image: IMagickImage, func: (pixels: IPixelCollection) => TReturnType): TReturnType
_use<TReturnType>(image: IMagickImage, func: (pixels: IPixelCollection) => Promise<TReturnType>): Promise<TReturnType>