Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 1.04 KB

README.md

File metadata and controls

35 lines (27 loc) · 1.04 KB

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