Skip to content

lightningbat/BmpLib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BmpLib

BmpLib is a lightweight, dependency-free JavaScript library for working with BMP (bitmap) image files at the binary level. It allows you to read, manipulate, and export BMP images using low-level ArrayBuffer, DataView, and Uint8Array operations.

⚠️ Note: This project is currently under active development. APIs and features may change, and not all image processing operations have been implemented yet.

Features (Implemented So Far)

  • Rotation (90° increments)
  • Crop
  • Flip (horizontal/vertical)
  • Grayscale (multiple methods)
  • Resize (Nearest Neighbor, Bilinear, Box Filter, Bicubic)

Tech Overview

  • Works with BMP images directly at the byte level.
  • Built on top of ArrayBuffer, DataView, and Uint8Array for efficient memory manipulation.
  • Rollup used to bundle for both CommonJS (CJS) and ECMAScript Module (ESM) formats.

Lightweight by Design

BmpLib is intentionally designed to be minimal and performant. Features like 1-bit dithering and halftoning — which require heavier algorithms and additional computation — may be implemented in a separate branch to maintain a clean and focused core version.

Future Additions

  • Export functionality
  • Brightness & contrast adjustments
  • (Optional) Advanced branch for 1-bit effects like dithering & halftoning

Usage

Usage examples and full documentation will be added as the library matures.

License

MIT

About

Lightweight JavaScript library for low-level BMP image manipulation

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors