问题标签 [pillow]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
python - 无法在服务器上安装 Pillow
将我的 Django 应用程序移植到 3.3 和 Django 1.6b2,我目前正在服务器上安装所有在本地工作的依赖项。
似乎我无法安装 Pillow,也无法安装 anyjson。这是我得到的错误:
对于 Anyjson :
枕头:
有人可以帮我吗?=)
python - 在 Mac 上安装 Pillow (PIL) 的权限被拒绝错误
我正在尝试安装 PIL 的 Pillow fork,我尝试过的每种方法都会导致此错误:
无法执行/:权限被拒绝
错误:命令“/”失败,退出状态为 1
出现这种情况
- 使用
pip install Pillow
- 使用
easy_install Pillow-master.zip
- 使用
python setup.py install
- 使用
python setup.py build
老实说,最后一个对我来说是最令人困惑的。我什至无法在它被提取到的同一目录中构建模块。
正如枕头自述文件所建议的那样,我已确保使用自制软件安装所有先决条件。
安装其他python模块时未出现此错误。
编辑:我已经使用和不使用 sudo 运行了所有这些命令。
python - 枕头不加载图像 - 无法识别图像文件
以下代码段有什么问题?
它与图像格式无关,我尝试了jpg和png。
编辑:
从互联网上随机下载的图片和以下最基本的片段确实会发生这种情况:
python - 枕头 virtualenv 安装失败:“命令 'gcc-4.2' 失败”
我在 virtualenv 中安装Mezzanine 。它在Pillow安装时失败,并出现与 gcc-4.2 相关的错误,这是其中的摘录。我实际上可以在我的机器上成功安装它,但不能在 virtualenv 内。但是,我希望它在 venv 中。我应该怎么办?
python - Pillow Image 对象和 numpy 数组之间的转换改变了维度
我正在使用 Pillow 和 numpy,但在 Pillow Image 对象和 numpy 数组之间的转换存在问题。
当我执行以下代码时,结果很奇怪。
结果是
为什么维度变了?
python - PIL 图像导入错误
我在虚拟环境中安装了 Pillow 和 qrcode 模块。
在 python shell 中,我可以使用 PIL 以编程方式创建测试图像:
太好了,正如我所期望的那样。但是,当我尝试使用依赖于 PIL 的模块时出现此错误:
为什么 qrcode 不能导入 PIL 的 Image 类,但它可以在 shell 中工作?
python - 在 Windows 上为 Python 2.7 64 位获取 PIL 而不是 Pillow
Pillow for Python 似乎完全坏了。每个图像都会产生一个IOError: cannot identify image file
. 使用 Python 2.6(我安装了 PIL)效果很好。有谁知道PIL-1.1.7.win-amd64-py2.7.exe
现在http://www.lfd.uci.edu/~gohlke/pythonlibs/已经转为只提供枕头了?
编辑:请注意,使用 Windows 64 位的 Python 2.7 上的 PIL 1.1.7 在打开相同文件时已确认工作,我们只是找不到安装程序。
python - 如何为 heroku 和 django 准备 FreeType PIL/Pillow 包?
我知道这个问题可能已经被问过好几次了,但到目前为止,没有一个答案能解决我的具体问题。
我要在 Heroku 上部署一个 django 应用程序;它需要在图像上绘制一些文本,然后将其显示给用户。文本将是意大利语,这意味着 unicode 支持是强制性的。
我遇到了几个问题:
- 要使用 ttf 字体,我需要在安装 PIL/Pillow 之前提供 freetype 库
- 如果我使用 pil 字体文件 (otf -> bdf -> pil),当 PIL 绘制非 ascii 文本时,我会收到 UnicodeEncodeError
一个(或两个)问题的解决方案将解决我的问题:
- 如何在 Heroku 上部署 PIL/Pillow 并支持 FreeType
- 如何使用 PIL 字体绘制非 ascii 字符
非常感谢
python - Scrapy custom ImagePipeline - Quality settings
our scraper currently not only downloads text but also images. The scraper in its current state is working fine, we have however big problems with the quality of the downloaded images. After checking the standard ImagePipeline, we implemented a custom one that tells Pillow to use the highest quality, it looks like this (and is configured in settings.py):
We also tried several other presets taken from this file: https://github.com/python-imaging/Pillow/blob/master/PIL/JpegPresets.py
We did however not see any improvements. Did someone here tackle this problem before or has an idea what's wrong with the code?
Thanks :)