update
This commit is contained in:
@@ -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),仅供主进程"复制收藏到系统剪贴板"用。
|
||||
|
||||
Reference in New Issue
Block a user