0.0.5 • Published 1 year ago

@initencounter/koishi-plugin-jimp v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

jimp

npm

jimp service

使用方法

1. 导入类型

import Jimp from '@initencounter/jimp';

2. 使用 Jimp 贴图

// 实例化 Jimp
let img1 = ctx.jimp.newJimp(x, y)

// 加载本地图片
let img2 = ctx.jimp.read('img2.png')

// 在 img 的(x, y)位置处贴上图片
img1.blit(img2, px, py)

// 获取 img1 的 PNG 格式的 Buffer 字符串
let img1_buffer = bigImage.getBufferAsync(ctx.jimp.MIME_PNG)

// 发送图片
session.send(h.image(img1_buffer, 'image/png'))

使用了此服务的插件:

0.0.5

1 year ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago