This commit is contained in:
2026-09-20 23:35:03 +08:00
parent 941ce4baab
commit 388c700996
19 changed files with 393 additions and 71 deletions

View File

@@ -102,7 +102,9 @@ function get(db, favId) {
function getImage(db, favId) {
const row = stmts(db).getImage.get(favId);
if (!row || !row.image) return null;
return Buffer.from(row.image).toString('base64');
// row.image 原生就是 Buffer(better-sqlite3 BLOB 列)—— 与 main.js
// clips:get-image 同一优化:Buffer.from 是一次无谓的 2MB 拷贝。
return row.image.toString('base64');
}
// 原始行(含 image BLOB),仅供主进程"复制收藏到系统剪贴板"用。