Automattic / Automattic/node-canvas
A1 Image Use Case
- Dominant language
- JavaScript
- Stars
- 10.7k
- Forks
- 1.2k
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 1
Description
In the docs it says
```
A1 and RGB30 do not yet support getImageData or putImageData.
Have a use case and/or opinion on working with these formats?
Open an issue and let us know! (See #935.)
```
I'm happy to provide my use case to argue in favour of adding more support for 1bit. I work with a waveshare eink display and it requires a 1bit bmp to paint the screen image.
## Steps to Reproduce
```js
var Canvas = require('canvas');
var canvas = Canvas.createCanvas(200, 200);
var ctx = canvas.getContext('2d', {pixelFormat: 'A1');
var imageData = context.getImageData(0, 0, width, height); // Throws Fatal Error Null Pointer (not implemented)
// or I might want to use canvas.toBuffer('image/bmp')
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.