Skip to content
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

优化速度 #102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

xingchenxuanfeng
Copy link

优化速度
1.不需要保存截图再读取,直接把图片二进制数据给PIL
2.之前的多线程处理有问题,实际上还是单线程,没有正确使用多线程

Signed-off-by: xc xc@XC-PC

优化速度
1.不需要保存截图再读取,直接把图片二进制数据给PIL
2.之前的多线程处理有问题,实际上还是单线程,没有正确使用多线程

Signed-off-by: xc <xc@XC-PC>
@passengerxlb
Copy link

OSError: cannot identify image file <_io.BytesIO object at 0x02A0DE40>
请问这个报错,怎么修改?
网上如是说:

As far as I am concerned, sio is still a StringIO(). If you are trying to open it as an image, try opening it with line = Image.open(name), where name is the actual name of the image, not a StringIO().

@passengerxlb
Copy link

@xingchenxuanfeng

1 similar comment
@passengerxlb
Copy link

@xingchenxuanfeng

@Skyexu
Copy link
Owner

Skyexu commented Jan 15, 2018

@xingchenxuanfeng 多谢,能否解释一下,为什么多线程要这样加 target 就可以?

@mochp
Copy link

mochp commented Jan 15, 2018

我也是同样的错误,求解答

@xingchenxuanfeng
Copy link
Author

@Skyexu 这个是语法问题吧,之前你的写法相当于先调用了methods.run_algorithm()这个函数,然后把这个方法的返回值传进Thread类里,正确的写法是把这个methods.run_algorithm函数作为一个变量穿进去。

@xingchenxuanfeng
Copy link
Author

@passengerxlb 这个我也不知道,感觉是api版本的问题,你的版本好像不能识别stringIO作为输入直接生成PIL图像。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants