1.1.0 • Published 2 years ago

epaperify v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

ePaperify

Framebuffer/image pre-processing library for e-Paper displays

Usage

export function to4Bpp(
  image: Buffer,
  format?: string | undefined | null,
  signal?: AbortSignal | undefined | null,
): Promise<Buffer>

Converts any image to 4-bit-per-pixel grayscale, with dithering to emulate 8-bit-per-pixel

  • Parameters:
    • image: image buffer, can be any image format supported by Rust image library, e.g. PNG, JPG, TIFF, WebP...
    • format: format string, e.g. "png", "jpg"; by default it's "png"
    • signal: signal of AbortController
export function toMonochrome(
  image: Buffer,
  format?: string | undefined | null,
  signal?: AbortSignal | undefined | null,
): Promise<Buffer>

Converts any image to 1-bit-per-pixel grayscale, with dithering to emulate 8-bit-per-pixel

  • Parameters:
    • image: image buffer, can be any image format supported by Rust image library, e.g. PNG, JPG, TIFF, WebP...
    • format: format string, e.g. "png", "jpg"; by default it's "png"
    • signal: signal of AbortController