donmccurdy / donmccurdy/ndarray-pixels

Image shape validation

Open
#160 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
33
Forks
8
PR merge metrics
No merged PRs in 30d

Description

Unlike some other packages in the `ndarray-*` ecosystem, `ndarray-pixels` requires images passed to `savePixels` to have certain supported shapes. I'm only committed to supporting 4-channel images, but support for some other shapes might be handled reasonably well by the logic in `common.ts` —

- https://github.com/donmccurdy/ndarray-pixels/blob/main/src/common.ts

That code is based on [`save-pixels`](https://github.com/scijs/save-pixels), which this is a fork of, so I'd need to look more closely to see whether anything other than 4-channel images should really be supported.

Whatever the case, I'd like to add documentation setting expectations for the input shape, and throw clear errors when those expectations are not met.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.