koishi-plugin-starfx-bot 0.4.0 → 0.4.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 +2 -2
- package/package.json +1 -1
- package/readme.md +2 -0
package/lib/index.js
CHANGED
|
@@ -188,7 +188,7 @@ async function drawLock(ctx, baseImage) {
|
|
|
188
188
|
const size1 = Math.min(imageMetadata.width, imageMetadata.height);
|
|
189
189
|
image.resize({ width: size1, height: size1, fit: "cover" });
|
|
190
190
|
const overlay = (0, import_sharp.default)(lockUrl).png();
|
|
191
|
-
overlay.resize({ width:
|
|
191
|
+
overlay.resize({ width: size1 });
|
|
192
192
|
image.composite([{ input: await overlay.toBuffer() }]);
|
|
193
193
|
return import_koishi.h.image(await image.png().toBuffer(), "image/png");
|
|
194
194
|
}
|
|
@@ -213,7 +213,7 @@ async function drawSold(ctx, baseImage) {
|
|
|
213
213
|
}).png();
|
|
214
214
|
const soldUrl = `${assetsDir}/sold.png`;
|
|
215
215
|
const overlay = (0, import_sharp.default)(soldUrl).png();
|
|
216
|
-
const overlaySize = Math.round(
|
|
216
|
+
const overlaySize = Math.round(size1 * 182 / 240);
|
|
217
217
|
overlay.resize({
|
|
218
218
|
width: overlaySize,
|
|
219
219
|
height: overlaySize
|
package/package.json
CHANGED