Github:https://github.com/croakfang/CroakTranslator
GItee:https://gitee.com/croakfang/CroakTranslator
之前写的翻译小工具由于百度API和政策的变化已经用不了了,所以趁着这个周末赶紧修复一波
被这个上传图片的要求整吐了,搞了一下午卡在这个“image图片上传Content-Type=multipart/form-data上”,C#没有现成的函数,只能照着网上找到的HTTP头格式用字符串一个个打出来,格式错一点都不能返回正确的结果
![](https://croakfang.fun/wp-content/uploads/2021/10/image-11.png)
突然发现百度在图片翻译中已经内置了译文覆盖功能,所以我也就不用造轮子了,直接把处理好的译文图片解码覆盖原文就行
这次更新还新增了多种语言翻译支持,可以自动检测原文语言并翻译成想要的语言
![](https://croakfang.fun/wp-content/uploads/2021/10/image-7.png)
![](https://croakfang.fun/wp-content/uploads/2021/10/image-10.png)
![](https://croakfang.fun/wp-content/uploads/2021/10/image-9-1024x352.png)
不得不说百度译文覆盖做的还是可以的,文字直接融入原文环境了
![](https://croakfang.fun/wp-content/uploads/2021/10/image-8.png)
![](https://croakfang.fun/wp-content/uploads/2021/10/image-6.png)
![](https://croakfang.fun/wp-content/uploads/2021/10/image-5.png)