feat: 使用自制绘图库替换gg库

This commit is contained in:
2025-05-15 10:51:08 +08:00
parent b24066d50b
commit 444be993c3
3 changed files with 36 additions and 8 deletions

View File

@@ -33,7 +33,7 @@ func xiBao(msg model.Message) (reply *model.Reply) {
FromMsg: msg,
}
}
xibao.GenerateCongratulationImage(tokens[1], "./resource/xibao_background.png", filePath, true)
xibao.GenerateCongratulationImageNew(tokens[1], "./resource/xibao_background.png", filePath, true)
imageMsg := message.ImageMessage{
Type: "image",
Data: message.ImageMessageData{
@@ -51,7 +51,7 @@ func xiBaoTemp(msg model.Message) (reply *model.Reply, isTrigger bool) {
handler.UnRegisterLiveHandler(msg.GroupInfo.GroupId, msg.UserId)
fileName := uuid.New().String()
filePath := util.GenTempFilePath(fmt.Sprintf("%s.png", fileName))
xibao.GenerateCongratulationImage(msg.RawMsg, "./resource/xibao_background.png", filePath, true)
xibao.GenerateCongratulationImageNew(msg.RawMsg, "./resource/xibao_background.png", filePath, true)
imageMsg := message.ImageMessage{
Type: "image",
Data: message.ImageMessageData{
@@ -78,7 +78,7 @@ func beiBao(msg model.Message) (reply *model.Reply) {
FromMsg: msg,
}
}
xibao.GenerateCongratulationImage(tokens[1], "./resource/beibao_background.png", filePath, false)
xibao.GenerateCongratulationImageNew(tokens[1], "./resource/beibao_background.png", filePath, false)
imageMsg := message.ImageMessage{
Type: "image",
Data: message.ImageMessageData{
@@ -96,7 +96,7 @@ func beiBaoTemp(msg model.Message) (reply *model.Reply, isTrigger bool) {
handler.UnRegisterLiveHandler(msg.GroupInfo.GroupId, msg.UserId)
fileName := uuid.New().String()
filePath := util.GenTempFilePath(fmt.Sprintf("%s.png", fileName))
xibao.GenerateCongratulationImage(msg.RawMsg, "./resource/beibao_background.png", filePath, false)
xibao.GenerateCongratulationImageNew(msg.RawMsg, "./resource/beibao_background.png", filePath, false)
imageMsg := message.ImageMessage{
Type: "image",
Data: message.ImageMessageData{