@wahaha216/koishi-plugin-jmcomic 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -652,6 +652,10 @@ async function decodeImage(imageBuffer, num, path) {
652
652
  const metadata = await (0, import_sharp.default)(Buffer.from(imageBuffer)).metadata();
653
653
  const height = metadata.height || 0;
654
654
  const width = metadata.width || 0;
655
+ if (height < num) {
656
+ await (0, import_sharp.default)(Buffer.from(imageBuffer)).toFile(path);
657
+ return;
658
+ }
655
659
  const over = height % num;
656
660
  const move = Math.floor(height / num);
657
661
  let decodedImageInstance = (0, import_sharp.default)({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wahaha216/koishi-plugin-jmcomic",
3
3
  "description": "下载JM本子,无需python。支持pdf、zip加密。",
4
- "version": "0.2.1",
4
+ "version": "0.2.2",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [
package/readme.md CHANGED
@@ -17,6 +17,13 @@ jm queue
17
17
 
18
18
  ## 更新日志
19
19
 
20
+ <details>
21
+ <summary>0.2.2</summary>
22
+
23
+ 高度不足图片分割数时输出原图,尝试规避提取图片高度为0的情况
24
+
25
+ </details>
26
+
20
27
  <details>
21
28
  <summary>0.2.1</summary>
22
29