From 3f0730ed4fd7a0d10b186dc3131e0ebbbdeae0eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Mon, 12 May 2025 19:25:03 +0800 Subject: [PATCH] fix --- src/image-size/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/image-size/index.ts b/src/image-size/index.ts index 717a7df2..66109f05 100644 --- a/src/image-size/index.ts +++ b/src/image-size/index.ts @@ -161,7 +161,7 @@ class JpegParser implements ImageParser { if (offset > BUFFER_SIZE) { const KEEP_BYTES = 20; // 保留足够数据以处理跨块边界的情况 if (offset > KEEP_BYTES) { - buffer = buffer.slice(offset - KEEP_BYTES); + buffer = buffer.subarray(offset - KEEP_BYTES); offset = KEEP_BYTES; } }