next-blurhash-previews 0.0.3-beta63 → 0.0.3-beta64

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.
@@ -81,12 +81,17 @@ function updateBlurHashPreview(canvasEl: HTMLCanvasElement, preview: blurhash) {
81
81
  canvasEl.width = width;
82
82
  canvasEl.height = height;
83
83
 
84
+ const start = +new Date();
85
+
84
86
  const pixels = decode(blurhash, width, height);
85
87
  const ctx = canvasEl.getContext("2d")!;
86
88
  const imageData = ctx.createImageData(width, height);
87
89
  imageData.data.set(pixels);
88
90
  ctx.putImageData(imageData, 0, 0);
89
91
 
92
+ const end = +new Date();
93
+
94
+ console.log("Blurhash", end - start);
90
95
  // if (true) {
91
96
  // if (!worker) {
92
97
  // const workerBlob = new Blob(
@@ -266,11 +266,14 @@ function updateBlurHashPreview(canvasEl, preview) {
266
266
  } = preview;
267
267
  canvasEl.width = width;
268
268
  canvasEl.height = height;
269
+ const start = +new Date();
269
270
  const pixels = decode$1(blurhash, width, height);
270
271
  const ctx = canvasEl.getContext("2d");
271
272
  const imageData = ctx.createImageData(width, height);
272
273
  imageData.data.set(pixels);
273
274
  ctx.putImageData(imageData, 0, 0);
275
+ const end = +new Date();
276
+ console.log("Blurhash", end - start);
274
277
  } })();` },
275
278
  }),
276
279
  createElement("script", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-blurhash-previews",
3
- "version": "0.0.3-beta63",
3
+ "version": "0.0.3-beta64",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "module": "index.js",