-
Marco De Donno authored
This is done by splitting the original function in an inner function that manage the creation of the image in a PIL format. This inner function is decorated with the redis cache function. Because of a bug in the PIL library, we can not unPickle a tiff image. The workaround is to use the following code: if isinstance( img, TiffImageFile ): if not hasattr( img, "use_load_libtiff" ): img.use_load_libtiff = True Source: https://github.com/python-pillow/Pillow/pull/4565/files This being patched in the current versions of PIL, we should be use this monkey-patch for new version of Python.
Marco De Donno authoredThis is done by splitting the original function in an inner function that manage the creation of the image in a PIL format. This inner function is decorated with the redis cache function. Because of a bug in the PIL library, we can not unPickle a tiff image. The workaround is to use the following code: if isinstance( img, TiffImageFile ): if not hasattr( img, "use_load_libtiff" ): img.use_load_libtiff = True Source: https://github.com/python-pillow/Pillow/pull/4565/files This being patched in the current versions of PIL, we should be use this monkey-patch for new version of Python.
Loading