From 7d6229e2d80885f39cfe9df363cd91bfcb765239 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BD=A0=E6=89=8B=E6=8D=A7=E9=B2=9C=E8=8A=B1?=
<157215725@qq.com>
Date: Fri, 12 May 2023 23:24:52 +0800
Subject: [PATCH] perf: sampling performance
---
docs/index.html | 7 ++++---
package.json | 2 +-
pnpm-lock.yaml | 8 ++++----
3 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/docs/index.html b/docs/index.html
index 64f16d6..2022ec6 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -143,9 +143,10 @@
Demo
const file = input.files[i]
if (file.type === 'image/gif') {
const buffer = await file.arrayBuffer()
- const { width, height } = decode(buffer)
- encoder.width = width
- encoder.height = height
+ const gif = decode(buffer)
+ console.log(gif)
+ encoder.width = gif.width
+ encoder.height = gif.height
frames.push(...(await decodeFramesInWorker(buffer, workerUrl)))
} else {
const url = URL.createObjectURL(file)
diff --git a/package.json b/package.json
index aefacaf..48bebe9 100644
--- a/package.json
+++ b/package.json
@@ -71,6 +71,6 @@
"vitest": "^0.31.0"
},
"dependencies": {
- "modern-palette": "^0.2.2"
+ "modern-palette": "^0.2.3"
}
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index fde3d69..941385b 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -2,8 +2,8 @@ lockfileVersion: '6.0'
dependencies:
modern-palette:
- specifier: ^0.2.2
- version: 0.2.2
+ specifier: ^0.2.3
+ version: 0.2.3
devDependencies:
'@qq15725/eslint-config':
@@ -2642,8 +2642,8 @@ packages:
ufo: 1.1.2
dev: true
- /modern-palette@0.2.2:
- resolution: {integrity: sha512-44Wr3mc3s2lDwhUDC2c+JIRS30bj2DMs6i2OjpsRXt7j9kFA53cpAYjVf2bAHKchXksZkaiVcrmtYmNbhEc8pQ==}
+ /modern-palette@0.2.3:
+ resolution: {integrity: sha512-2ebapaxGt5stCSPNEW+uE6JSyFCdk0NxrdX85dPJxLtOL/lAZmsY1bM3dkqlaAIXgJIKo09+3oWelc5BQdTcOA==}
dev: false
/modify-values@1.0.1: