@corbet-labs/cink 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/generated/tables.ts +1 -1
- package/src/index.ts +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@corbet-labs/cink",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Handwritten signature image rendering for correspondence. Pixels, not signatures. Mirrors the cink Rust crate release line.",
|
|
5
5
|
"license": "FSL-1.1-ALv2",
|
|
6
6
|
"publishConfig": {
|
package/src/generated/tables.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -32,6 +32,11 @@ export function defaultMaxPixels(): number {
|
|
|
32
32
|
return defaults.max_pixels;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
/** Accepted image formats, from `tables/defaults.json`. */
|
|
36
|
+
export function supportedFormats(): string[] {
|
|
37
|
+
return [...defaults.formats].sort();
|
|
38
|
+
}
|
|
39
|
+
|
|
35
40
|
const PNG_MAGIC = [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a];
|
|
36
41
|
|
|
37
42
|
function pngDimensions(bytes: Uint8Array): [number, number] | null {
|