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

x/lume/deps/imagick.ts>MagickImage

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

Constructors

new
private
MagickImage(instance: number, settings: MagickSettings)

Properties

private
readonly
_settings: MagickSettings
animationDelay: number
animationIterations: number
animationTicksPerSecond: number
readonly
artifactNames: ReadonlyArray<string>
readonly
attributeNames: ReadonlyArray<string>
backgroundColor: MagickColor
readonly
baseHeight: number
readonly
baseWidth: number
blackPointCompensation: boolean
borderColor: MagickColor
readonly
boundingBox: MagickGeometry | null
readonly
channelCount: number
readonly
channels: ReadonlyArray<PixelChannel>
chromaticity: ChromaticityInfo
classType: ClassType
colorFuzz: Percentage
colormapSize: number
colorSpace: ColorSpace
colorType: ColorType
comment: string | null
readonly
compression: CompressionMethod
contrast: () => unknown
density: Density
depth: number
endian: number
readonly
fileName: string | null
filterType: number
format: MagickFormat
readonly
gamma: number
gifDisposeMethod: GifDisposeMethod
hasAlpha: boolean
readonly
height: number
readonly
interlace: Interlace
inverseContrast: () => unknown
inverseOpaque: (target: MagickColor, fill: MagickColor) => unknown
inverseTransparent: (color: MagickColor) => unknown
label: string | null
opaque: (target: MagickColor, fill: MagickColor) => unknown
orientation: OrientationType
quality: number
readonly
settings: MagickSettings
readonly
signature: string | null
toString: () => string
virtualPixelMethod: VirtualPixelMethod
readonly
width: number

Methods

private
_contrast(enhance: boolean)
private
_opaque(
target: MagickColor,
invert: boolean,
)
private
_sigmoidalContrast(
sharpen: boolean,
contrast: number,
midpointOrPercentage?: number | Percentage,
channelsOrUndefined?: Channels,
): void
private
_transparent(color: MagickColor, invert: boolean)
private
fromBool(value: boolean): number
private
readFromArray(
array: ByteArray,
readSettings: MagickReadSettings,
exception: Exception,
): void
private
readOrPing(
ping: boolean,
fileNameOrArrayOrColor: string | ByteArray | MagickColor,
settingsOrWidthOrUndefined?: MagickReadSettings | number,
heightOrUndefined?: number,
): void
private
toBool(value: number): boolean
private
valueOrDefault<TType>(value: TType | undefined, defaultValue: TType): TType
protected
_instanceNotInitialized(): void
_use<TReturnType>(func: (image: IMagickImage) => TReturnType): TReturnType
_use<TReturnType>(func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>
alpha(value: AlphaOption): void
autoOrient(): void
blur(): void
blur(channels: Channels): void
blur(radius: number, sigma: number): void
blur(
radius: number,
sigma: number,
channels: Channels,
): void
border(size: number): void
border(width: number, height: number): void
brightnessContrast(brightness: Percentage, contrast: Percentage): void
brightnessContrast(
brightness: Percentage,
contrast: Percentage,
channels: Channels,
): void
channelOffset(pixelChannel: PixelChannel): number
charcoal(): void
charcoal(radius: number, sigma: number): void
clahe(
xTiles: number,
yTiles: number,
numberBins: number,
clipLimit: number,
): void
clahe(
xTiles: Percentage,
yTiles: Percentage,
numberBins: number,
clipLimit: number,
): void
clone<TReturnType>(func: (image: IMagickImage) => TReturnType): TReturnType
clone<TReturnType>(func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>
colorAlpha(color: MagickColor): void
compare(image: IMagickImage, metric: ErrorMetric): number
compare(
image: IMagickImage,
metric: ErrorMetric,
channels: Channels,
): number
composite(image: IMagickImage): void
composite(image: IMagickImage, compose: CompositeOperator): void
composite(
image: IMagickImage,
channels: Channels,
): void
composite(
image: IMagickImage,
args: string,
): void
composite(
image: IMagickImage,
args: string,
channels: Channels,
): void
composite(image: IMagickImage, point: Point): void
composite(
image: IMagickImage,
point: Point,
channels: Channels,
): void
composite(
image: IMagickImage,
point: Point,
): void
composite(
image: IMagickImage,
point: Point,
channels: Channels,
): void
composite(
image: IMagickImage,
point: Point,
args: string,
): void
composite(
image: IMagickImage,
point: Point,
args: string,
channels: Channels,
): void
compositeGravity(image: IMagickImage, gravity: Gravity): void
compositeGravity(
image: IMagickImage,
gravity: Gravity,
): void
compositeGravity(
image: IMagickImage,
gravity: Gravity,
channels: Channels,
): void
compositeGravity(
image: IMagickImage,
gravity: Gravity,
args: string,
): void
compositeGravity(
image: IMagickImage,
gravity: Gravity,
args: string,
channels: Channels,
): void
compositeGravity(
image: IMagickImage,
gravity: Gravity,
point: Point,
): void
compositeGravity(
image: IMagickImage,
gravity: Gravity,
point: Point,
channels: Channels,
): void
compositeGravity(
image: IMagickImage,
gravity: Gravity,
point: Point,
): void
compositeGravity(
image: IMagickImage,
gravity: Gravity,
point: Point,
channels: Channels,
): void
compositeGravity(
image: IMagickImage,
gravity: Gravity,
point: Point,
args: string,
): void
compositeGravity(
image: IMagickImage,
gravity: Gravity,
point: Point,
args: string,
channels: Channels,
): void
contrastStretch(blackPoint: Percentage): void
contrastStretch(blackPoint: Percentage, whitePoint: Percentage): void
crop(geometry: MagickGeometry): void
crop(geometry: MagickGeometry, gravity: Gravity): void
crop(width: number, height: number): void
crop(
width: number,
height: number,
gravity: Gravity,
): void
deskew(threshold: Percentage): number
distort(method: DistortMethod, params: number[]): void
distort(
method: DistortMethod,
settings: DistortSettings,
params: number[],
): void
draw(drawables: IDrawable[]): void
draw(...drawables: IDrawable[]): void
evaluate(
channels: Channels,
operator: EvaluateOperator,
value: number,
): void
evaluate(
channels: Channels,
operator: EvaluateOperator,
value: Percentage,
): void
evaluate(
channels: Channels,
geometry: MagickGeometry,
operator: EvaluateOperator,
value: number,
): void
evaluate(
channels: Channels,
geometry: MagickGeometry,
operator: EvaluateOperator,
value: Percentage,
): void
extent(width: number, height: number): void
extent(
width: number,
height: number,
gravity: Gravity,
): void
extent(
width: number,
height: number,
backgroundColor: MagickColor,
): void
extent(geometry: MagickGeometry): void
extent(geometry: MagickGeometry, gravity: Gravity): void
extent(
geometry: MagickGeometry,
gravity: Gravity,
backgroundColor: MagickColor,
): void
extent(geometry: MagickGeometry, backgroundColor: MagickColor): void
flip(): void
flop(): void
getArtifact(name: string): string | null
getAttribute(name: string): string | null
getPixels<TReturnType>(func: (pixels: IPixelCollection) => TReturnType): TReturnType
getPixels<TReturnType>(func: (pixels: IPixelCollection) => Promise<TReturnType>): Promise<TReturnType>
getProfile(name: string): IImageProfile | null
getWriteMask<TReturnType>(func: (mask: IMagickImage | null) => TReturnType): TReturnType
getWriteMask<TReturnType>(func: (mask: IMagickImage | null) => Promise<TReturnType>): Promise<TReturnType>
histogram(): Map<string, number>
inverseSigmoidalContrast(contrast: number): void
inverseSigmoidalContrast(contrast: number, midpointPercentage: Percentage): void
inverseSigmoidalContrast(contrast: number, midpoint: number): void
inverseSigmoidalContrast(
contrast: number,
midpoint: number,
channels: Channels,
): void
level(blackPoint: Percentage, whitePoint: Percentage): void
level(
blackPoint: Percentage,
whitePoint: Percentage,
gamma: number,
): void
level(
channels: Channels,
blackPoint: Percentage,
whitePoint: Percentage,
): void
level(
channels: Channels,
blackPoint: Percentage,
whitePoint: Percentage,
gamma: number,
): void
linearStretch(blackPoint: Percentage, whitePoint: Percentage): void
liquidRescale(geometry: MagickGeometry): void
liquidRescale(width: number, height: number): void
modulate(brightness: Percentage): void
modulate(brightness: Percentage, saturation: Percentage): void
modulate(
brightness: Percentage,
saturation: Percentage,
): void
negate(): void
normalize(): void
oilPaint(): void
oilPaint(radius: number): void
ping(fileName: string, settings?: MagickReadSettings): void
ping(array: ByteArray, settings?: MagickReadSettings): void
read(
color: MagickColor,
width: number,
height: number,
): void
read(fileName: string, settings?: MagickReadSettings): void
read(array: ByteArray, settings?: MagickReadSettings): void
readFromCanvas(canvas: HTMLCanvasElement): void
removeArtifact(name: string): void
removeAttribute(name: string): void
removeProfile(name: string): void
repage(): void
resize(geometry: MagickGeometry): void
resize(width: number, height: number): void
rotate(degrees: number): void
separate<TReturnType>(func: (images: IMagickImageCollection) => TReturnType): TReturnType
separate<TReturnType>(func: (images: IMagickImageCollection) => Promise<TReturnType>): Promise<TReturnType>
separate<TReturnType>(func: (images: IMagickImageCollection) => TReturnType, channels: Channels): TReturnType
separate<TReturnType>(func: (images: IMagickImageCollection) => Promise<TReturnType>, channels: Channels): Promise<TReturnType>
sepiaTone(): void
setArtifact(name: string, value: string): void
setArtifact(name: string, value: boolean): void
setAttribute(name: string, value: string): void
setProfile(name: string, data: ByteArray): void
sharpen(): void
sharpen(radius: number, sigma: number): void
sharpen(
radius: number,
sigma: number,
channels: Channels,
): void
shave(leftRight: number, topBottom: number)
sigmoidalContrast(contrast: number): void
sigmoidalContrast(contrast: number, midpointPercentage: Percentage): void
sigmoidalContrast(contrast: number, midpoint: number): void
sigmoidalContrast(
contrast: number,
midpoint: number,
channels: Channels,
): void
solarize(): void
splice(geometry: MagickGeometry): void
strip(): void
transparent(color: MagickColor): void
trim(): void
trim(...edges: Gravity[]): void
trim(percentage: Percentage): void
vignette(): void
vignette(
radius: number,
sigma: number,
x: number,
y: number,
): void
wave(): void
wave(
amplitude: number,
length: number,
): void
write<TReturnType>(func: (data: Uint8Array) => TReturnType): TReturnType
write<TReturnType>(format: MagickFormat, func: (data: Uint8Array) => TReturnType): TReturnType
write<TReturnType>(func: (data: Uint8Array) => Promise<TReturnType>): Promise<TReturnType>
write<TReturnType>(format: MagickFormat, func: (data: Uint8Array) => Promise<TReturnType>): Promise<TReturnType>
writeToCanvas(canvas: HTMLCanvasElement): void

Static Methods

private
createInstance(): number
_createFromImage(instance: number, settings: MagickSettings): MagickImage
_use<TReturnType>(func: (image: IMagickImage) => TReturnType): TReturnType
_use<TReturnType>(func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>
create(
color: MagickColor,
width: number,
height: number,
): IMagickImage
create(fileName: string, settings?: MagickReadSettings): IMagickImage