腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
1
回答
在
Python
中
从
二进制
数据
加载
Pillow
Image
对象
的
最好
方法
?
python
、
numpy
、
python-imaging-library
、
png
我有一个用
Python
的
Pillow
库修改PNG文件
的
程序。我想知道如何
从
PIL
的
image
对象
将
二进制
数据
加载
到PNG图像
中
。我通过网络接收
二进制
数据
形式
的
PNG (例如,
数据
看起来像b‘\x89PNG\r\n\x1a\n\x00\rIHDR...’)。完成此任务
的
最佳
方法
浏览 14
提问于2020-05-27
得票数 0
2
回答
为什么“导入PIL;PIL.
Image
”不起作用,而“
从
PIL导入图像”起作用?
python
、
python-imaging-library
在
python
解释器
中
:>>> PIL.
Image
File "<stdin>", line 1PIL.
Image
<module 'PIL.
Image
' from '/usr/lib/
python
2.7/site-pack
浏览 1
提问于2017-11-16
得票数 2
3
回答
在
VS代码
中
获取"ModuleNotFoundError:没有名为‘
Pillow
’
的
模块“
python
、
python-3.x
、
visual-studio-code
、
python-imaging-library
我
在
一个虚拟环境
中
安装了
Pillow
模块,如下所示:Collecting
Pillow
$
python
--version$ which
python
/mnt/d/github/
python
_dev/venv
浏览 3
提问于2020-09-21
得票数 0
8
回答
无法
在
Windows
中
安装枕头
python
、
github
、
pip
、
pillow
安装过程要求使用zlib,我甚至安装了它&
从
Github克隆它。这一切我都是新手。C:\Users\GThell\
Pillow
>pip install -e .\local\programs\
python
\
python
36\lib\site-packages (from
Pillow
==3.5.0.dev0) Running setup.py develop for
Pil
浏览 7
提问于2016-12-16
得票数 20
回答已采纳
28
回答
ImportError:没有名为PIL
的
模块
python
、
python-imaging-library
、
easy-install
我
在
shell中使用以下命令来安装PIL:然后我运行
python
并键入以下内容:import PIL。recent call last):ImportError: No module named PIL 我从来没有遇到过这样
的
问题
浏览 10
提问于2012-01-15
得票数 268
回答已采纳
6
回答
为什么scipy.ndimage.io.imread返回
的
是PngImageFile,而不是一个值数组
python
、
scipy
在
一台机器上,当我试图读取一个.png文件时,它返回一个大小为(Wxhx3)
的
整数数组:In[3]: out= imread(png_file)Out[4]: (750, 1000, 4)
在
另一台机器上,使用相同
的
图像文件,这将返回一个封装在数组
中
的
PIL.PngImagePlugin.PngImageFile
对象
。imread(png_f
浏览 0
提问于2013-09-26
得票数 8
回答已采纳
3
回答
将reportlab图像报告为PDF:“请调用to字节()”
python
、
pdf
、
rhel
、
reportlab
、
pillow
_data = im.tostring() "Please call tobytes() instead.")第二种
方法
: &quo
浏览 5
提问于2016-04-13
得票数 4
回答已采纳
2
回答
python
-kivy通过存储
在
变量
中
的
数据
显示图像
python
、
database
、
image
、
kivy
有没有类似于下面所示
的
方法
,from kivy.uix.gridlayout import GridLayout
image
="all
image
data as a string"root.add_widget(
image
) r
浏览 0
提问于2021-03-05
得票数 1
5
回答
如何使用
Python
在
OS剪贴板
中
添加/获取图像
数据
?
python
、
python-3.x
、
clipboard
、
clipboarddata
在
搜索跨平台解决方案以替换或获取
Python
中
的
剪贴板文本时,但是,这些
方法
只能使用纯文本,而不能使用其他剪贴板
数据
(如图像)。此处描述
的
方法
(仅适用于Windows )似乎使用了以下步骤: 获取图像
的
原始
二进制
数据
--该
方法
使用
Python
图像
加
浏览 22
提问于2014-06-29
得票数 6
1
回答
加快OpenCV和枕头图像
的
加载
速度
python-3.x
、
image
、
opencv
、
image-processing
、
python-imaging-library
在
我
的
测试
python
应用程序
中
,我有一个非常标准
的
JPEG文件1500 x 800作为缓冲区buf
加载
到内存
中
。需要将该缓冲区解码为图像
对象
,以便我可以
在
OpenCV中使用它。我知道两种解决办法:from PIL import
Image
image
=
Image
.open(BytesIO(buf))平均
浏览 0
提问于2020-10-20
得票数 3
2
回答
django ImageField未显示,抛出ImportError
python
、
django
现在,当我试图渲染我得到
的
模板时: description = models.CharField(max_length = 1000) </p>
浏览 0
提问于2017-06-17
得票数 0
1
回答
如何让GCP函数生成
的
图像在GC存储中被识别为有效?
python
、
firebase
、
google-cloud-functions
、
google-cloud-storage
、
python-imaging-library
我正在尝试使用
python
创建一个图像缩略图创建函数,该函数
在
google云平台
的
函数
中
运行。图像以base64字符串
的
形式发送到云函数,并使用
Python
的
Pillow
包进行处理和缩小。然后将其作为图像上传,
从
Pillow
image
对象
上传到BytesIO
对象
,然后保存到谷歌云存储。这一切都已成功完成。我看过this SO post,它和我
的
浏览 29
提问于2021-02-10
得票数 1
回答已采纳
3
回答
如何在Windows上安装OpenJPEG并与枕头一起使用?
python-3.x
、
jpeg2000
我想使用
Python
Pillow
库将16位灰度数组保存为jp2 (“JPEG2000”)格式。 当我试图
在
我
的
Windows机上安装所需
的
库OpenJPEG时,我碰壁了。不是很清楚...但我假设我需要下载Win64
二进制
文件,并简单地将它们放到我
的
路径上(我确实做到了)。完成后,
在
Windows上使用Anaconda 4.3.0
中
的
Pillow
4.0.0时,我仍然收到以下错误。IOError:
浏览 3
提问于2017-02-12
得票数 3
7
回答
如何在PIL
中
打开互联网上
的
图像?
python
、
python-imaging-library
、
urllib2
我想在网上找到一张图片
的
尺寸。我试着用import urllib2 as urllibim =
Image
.open(fd)如中所建议
的
,但我得到了错误消息我检查了一下,根据dir,urllib2.urlopen(url
浏览 9
提问于2012-08-19
得票数 27
回答已采纳
1
回答
ImportError: DLL
加载
失败:找不到指定
的
模块。当尝试“
从
PIL导入图像”时
python
、
python-2.7
、
python-imaging-library
导入_imaging作为核心 "C:/Users/me/PycharmProjects/asd78798/
image
2tif/
image
2tif.py",第12行,
从
PIL导入图像文件"C:\
python</
浏览 0
提问于2018-12-06
得票数 1
回答已采纳
2
回答
将PIL/枕头图像转换为
数据
URL
python-3.x
、
image
在
Python
3
中
,是否有可能将PIL/
Pillow
Image
对象
转换为data:
image
/png URL,以便将图像粘贴到浏览器地址栏
中
?到目前为止,我
的
尝试都失败了:或者,是否有其他好
方法
从
Python
浏览 2
提问于2020-03-13
得票数 2
回答已采纳
2
回答
无法安装
pillow
n Mac OS Catalina (10.15.7)
python
、
macos
、
python-imaging-library
我想在我
的
Mac OS Catalina (10.15.7)上运行一个基于
Python
的
项目的本地副本。项目使用poetry作为
Python
依赖项管理器工具。
在
安装
python
依赖项时,它会在遵循
pillow
包时崩溃。之前我用安装了greenlet包,但是
在
我
的
Mac上把global
python
版本
从
3.9.1改为3.8.6 (peenv)解决了这个问题 为了正确安装枕头包,我需要做些什么?3.8
浏览 7
提问于2021-03-05
得票数 1
1
回答
ReportLab显示方向错误
的
图像
python
、
python-imaging-library
、
reportlab
我使用reportlab
从
python
API生成PDF文档。这些文档包括
加载
了以下内容
的
图片(以前使用相机或移动设备拍摄):img =
Image
(path) story.append(我曾经遇到过类似的问题,我选择
的
解决方案是使用魔杖,而不是
Pillow
或
Pillow
,但似乎ReportLab只使用PIL来处理
Python
中</e
浏览 2
提问于2015-12-23
得票数 0
2
回答
有没有办法
在
venv/web服务器上安装Tesseract OCR?
python
、
tesseract
、
python-tesseract
我制作了一个做OCR
的
Python
脚本,然后我回收了这个脚本,并使用烧瓶制作了一个web应用程序。这个web应用程序和它
的
库都在一个虚拟环境
中
,但是这个应用程序使用
的
是安装在操作系统(Windows)
中
的
Tesseract OCR。我一直
在
本地服务器上测试它。现在是部署
的
时候了,我不知道如何在venv
中
安装Tesseract,也不知道是否可以
在
服务器上安装它。我不知道我说的话是否有意义,但我很迷茫,
浏览 1
提问于2020-03-18
得票数 5
回答已采纳
1
回答
如何在
python
中用tkinter编辑背景图像?
python
、
python-3.x
、
user-interface
、
tkinter
、
background
我试着编辑tkinter代码
的
背景图像,但即使我用"landscape.png“重命名不同
的
图片,也不能这样做,而不管不同
的
图片是大还是小。我不知道我能做些什么来改善这个问题,就像这段代码只适用于一种类型
的
图片,我不知道为什么。我正试着处理这个问题三天,这是我最后
的
求助手段。background_label = tk.Label(root, <e
浏览 1
提问于2019-07-29
得票数 0
回答已采纳
点击加载更多
热门
标签
更多标签
云服务器
对象存储
ICP备案
云点播
腾讯会议
活动推荐
运营活动
广告
关闭
领券