【发布时间】:2012-09-16 06:10:52
【问题描述】:
我有一些代码对一堆 Python Imaging Library (PIL) Image 对象执行(独立)操作。我想尝试使用并行处理来加快速度,所以我阅读了下面的多处理模块:
http://docs.python.org/library/multiprocessing.html
但我仍然不太清楚如何使用多处理来解决这个问题。
从概念上讲,我似乎可以使用图像对象的 multiprocessing.Queue 并使用工作人员池。但 Image 对象似乎“不可挑选”:
UnpickleableError: Cannot pickle <type 'ImagingCore'> objects
有没有更好的方法来并行处理 PIL 图像?
【问题讨论】:
标签: python multiprocessing python-imaging-library