Skip to content

Commit

Permalink
optimize ruturn render image data
Browse files Browse the repository at this point in the history
  • Loading branch information
snowtafir committed Aug 25, 2024
1 parent 834901a commit 1adfd85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yz-yuki-plugin",
"version": "1.0.3-rc.4",
"version": "1.0.3-rc.5",
"description": "优纪插件,yunzaijs 关于 微博推送、B站推送 等功能的拓展插件",
"author": "snowtafir",
"type": "module",
Expand Down
3 changes: 3 additions & 0 deletions src/utils/puppeteer.render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ export class YukiPuppeteerRender extends Puppeteer {
numSun++; // 增加截图次数

if (buff !== false) {
if (!Buffer.isBuffer(buff)) {
buff = Buffer.from(buff)
}
/** 计算图片大小 */
const kb = (buff?.length / 1024).toFixed(2) + "kb"; // 计算图片大小

Expand Down

0 comments on commit 1adfd85

Please sign in to comment.