-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我获取到的群聊中用户发送的图片是这样的格式@f4aee0239ecca855c037e61d35a1883eb263b3cfc......我处理不了他 #2677
Comments
拜托啦 |
Hello @aqpmzngldh! 👋 I'm Dosu, a friendly bot here to assist with bugs, questions, and guiding you on your contributor journey while we wait for a human maintainer to join us. I'm here to help, so let's dive into your issue about image encoding in group chats and get that sorted. I'll have a full answer for you shortly! |
|
To handle the image encoding from group chats in Wechaty for OCR processing, you'll primarily work with the Here's a simplified approach to process these images:
Example code snippet: async function processImageWithOCR(imageId: string) {
const fileBox = await image.artwork(); // Adjust based on needed quality
const buffer = await fileBox.toBuffer();
const ocrResult = await ocrTool.processImage(buffer);
return ocrResult;
} This example assumes you have an OCR tool that can process images from a buffer. Adjust the For the specific encoding format you mentioned (
|
我想通过群聊中用户发送的图片然后通过ocr识别图片内容做出处理,但是我处理不了获取的图片编码,所以这样的图片该怎么处理,他又是怎么编码的@f4aee0239ecca855c037e61d35a1883eb263b3cfc......
The text was updated successfully, but these errors were encountered: