@slithy/prim-lib 0.2.0 → 0.2.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.
Files changed (2) hide show
  1. package/dist/index.js +3 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -164,7 +164,9 @@ var Canvas = class _Canvas {
164
164
  }
165
165
  return new Promise((resolve) => {
166
166
  const img = new Image();
167
- img.crossOrigin = "anonymous";
167
+ if (!url.startsWith("blob:") && !url.startsWith("data:")) {
168
+ img.crossOrigin = "anonymous";
169
+ }
168
170
  img.src = url;
169
171
  img.onload = () => {
170
172
  const w = img.naturalWidth;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slithy/prim-lib",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Core engine for primitive-based image reconstruction.",
5
5
  "type": "module",
6
6
  "exports": {