Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
如何使用 PIL 创建透明 gif(或 png)(python-imaging)
尝试去create带 PIL 的透明 gif 到目前为止我有这个 from PIL import Image img Image new RGBA 100 100 255 0 0 0 img save test gif GIF transp
python
pythonimaginglibrary
transparency
gif
Imaging
python tkinter如何将按键绑定到按钮
编程新手 尤其是 python 和 tKinter 如何创建一种将键 s 绑定到按钮或功能的方法sharpen 任何帮助都是极好的 from Tkinter import from PIL import Image ImageTk Imag
python
python27
Tkinter
pythonimaginglibrary
我只是“移动”图像,它的元数据就会改变......
我只是复制了图像并将其保存到当前目录中的另一个临时文件夹中 没有任何修改 但图像占用了更多 磁盘空间 比它 字节大小 和 当我这样做时 我只丢失了大部分图像的元数据 例如位置数据 设备型号 F 号等Color space Alpha cha
python3x
image
size
pythonimaginglibrary
jpeg
将 numpy 数组保存为具有自定义颜色的单通道 png
我有一个整数 numpy 数组 表示具有很少值 大约 2 5 的图像 我想将其保存为 png 文件 并为每个值提供自定义颜色 我正在尝试这样 import numpy as np from PIL import Image array np
python
matplotlib
pythonimaginglibrary
PIL 图像从 RGB 转换为 YCbCr 结果为 4 个通道而不是 3 个通道,并且行为类似于 RGB
嗯 标题很不言自明 我有一个图像文件 我想将其分别分成 Y Cb 和 Cr 打开文件后 将其从 RGB 这是打开图像文件时的默认模式 转换为 YCbCr 然后使用 numpy array 将其转换为数组 结果是一个具有 4 个通道的 2D
python
pythonimaginglibrary
如何将 PIL 与 PyPy 一起使用?
我进行了一些搜索 但找不到将 PIL 与 PyPy 一起使用的教程 根据 PyPy 的博客 支持 PIL 我在 PYTHONPATH 中使用 pip 安装了 PIL 下载后 pip make 2个 pyd文件 imaging pyd和 im
python
pythonimaginglibrary
PyPy
将图片读取为灰度numpy数组,并保存回来
我尝试了以下操作 希望看到源图像的灰度版本 from PIL import Image import numpy as np img Image open img png convert L arr np array img getdata
image
NumPy
imageprocessing
python33
pythonimaginglibrary
Pip无法安装枕头
当尝试使用 pip 安装枕头时 会产生此错误 我尝试过重新安装安装工具 但没有效果 我在安装了 Diet Pi 的 pi 0 上运行 pip install pillow Looking in indexes https pypi org
python
pip
pythonimaginglibrary
使用 PIL 缩放图像并保持透明度和颜色?
假设您想要缩放透明图像 但还不知道稍后将其合成的背景颜色 不幸的是 PIL 似乎合并了完全透明像素的颜色值 导致了糟糕的结果 有没有办法告诉 PIL resize 忽略完全透明的像素 import PIL Image filename tr
python
resize
transparency
pythonimaginglibrary
Scale
PIL 的 ImageGrab 以错误的分辨率进行捕获
我正在尝试使用此代码进行全屏 1920 x 1080 捕获 但保存的图像只有 1536 x 864 解决方案 正如马克在下面指出的那样 Windows 具有缩放功能 可以通过 控制面板 gt 显示 进行更改 将其一直调低 from PIL
python
pythonimaginglibrary
带有 PIL 的 Pyinstaller。导入错误:无法导入名称 _imaging
我在运行包含枕头的已编译可执行文件时遇到问题 我使用了 pyinstaller 它似乎编译得很好 但是运行 exe 后 会抛出错误 似乎与引用 imaging 而不是 Image 存在冲突 首先 我觉得很奇怪pillow如何安装到PIL目录
Build
pyinstaller
pythonimaginglibrary
如何获取 Base64 编码字符串形式的 PIL 图像
在过去的几个小时里 我一直在尝试创建图像的 Base64 字符串 但它不起作用 ship color 0 100 100 255 img Image new RGBA 100 100 for i in range 20 for j in r
python
python3x
Base64
pythonimaginglibrary
Python:从图像中删除 Exif 信息
为了减小网站中使用的图像大小 我将质量降低到 80 85 这在一定程度上大大减小了图像尺寸 为了在不影响质量的情况下进一步减小尺寸 我的朋友指出 来自相机的原始图像有很多称为 Exif 信息的元数据 由于网站中的图像不需要保留此 Exif
python
imageprocessing
pythonimaginglibrary
EXIF
exiftool
在python中手动绘制树状图
我已经实现了一种算法来解决图中的聚类问题 我使用 python 库 python graph 来表示该图 现在 在计算的每一步 算法是迭代的 我必须绘制树状图的一部分 事实上 该算法是分裂的 从原始图开始计算簇的意义上来说 现在 我不知道用
python
pythonimaginglibrary
dendrogram
如何更改拍摄的文档以使其看起来“扫描”
我怎么能够do this http www techcrunch com 2009 03 17 jotnot turns your iphones camera into a document scanner 在 Python PIL 中
python
imageprocessing
pythonimaginglibrary
imagescanner
使用端点和凸出距离绘制圆弧。在 OpenCV 或 PIL 中
在编写将 dxf 转换为 png 的脚本时 我需要绘制只有三个参数的圆弧 即圆弧的起点 圆弧的终点和凸出距离 我检查了OpenCV和PIL 它们需要开始和结束角度来绘制这个弧 我可以使用一些几何图形找出这些角度 但想知道是否还有其他我错过的
opencv
imageprocessing
pythonimaginglibrary
DXF
在python中的二进制图像中绘制多个对象周围的边界矩形
I am trying to write some easy code in python to produce bounding rectangles around objects in a binary image where ther
python
image
opencv
pythonimaginglibrary
boundingbox
如何使用 python Imaging 创建新的彩色图像?
我想创建一个新图像 背景颜色 这个工作 img Image new RGB width height red 但我想定制颜色 当我将 红色 更改为 228 150 150 时 它不起作用 你有想法这样做吗 这对我有用 请注意 颜色元组不在引
python
pythonimaginglibrary
如何使用 python 的 PIL 以一定角度绘制文本?
使用 Python 我希望能够使用 PIL 以不同角度绘制文本 例如 假设您正在钟面周围绘制数字 号码3会按预期出现 而12我们将逆时针旋转 90 度来绘制 因此 我需要能够从许多不同的角度绘制许多不同的弦 将文本绘制到临时空白图像中 旋转
python
pythonimaginglibrary
Imaging
将 RGB 数组转换为 PIL 图像
在我的代码中 我正在创建一个 RGB 数组 256 256 3 我需要显示它 我在从 RGB 数组创建 PIL 图像时遇到问题 我写这段代码是为了解释 import numpy as np from PIL import Image ima
python3x
pythonimaginglibrary
«
1
2
3
4
5
6
7
8
...20
»