painbrush

1.0.21.1.0
src/image.ts
src/image.tsDeleted
−22
Index: package/src/image.ts
===================================================================
--- package/src/image.ts
+++ package/src/image.ts
@@ -1,22 +0,0 @@
-import { encode } from "fast-bmp";
-import type { Layer } from "./layer.ts";
-
-export const toImage = (
-  layer: Layer,
-): Uint8Array<ArrayBufferLike> => {
-  const imageData = {
-    ...layer,
-    bitsPerPixel: 24,
-    compression: 0,
-    colorMasks: [],
-    components: 1,
-  };
-
-  const encoded = encode({
-    ...imageData,
-    channels: 3,
-    data: new Uint8Array(imageData.data),
-  });
-
-  return encoded;
-};