在RPI上直接从内存中显示带有omxiv的图像

问题描述 投票:0回答:1

[我想在PILLOW中创建图像,并在Raspberry Pi上将其显示在屏幕上,例如直接从内存中进行omxiv,而不将其保存到存储卡中,如下所示:

Python 2.7:

from PIL import Image
import os

img = Image.new('RGB', size=(150, 50), color=(0, 0, 255))
....
im_file = ????
os.system('omxiv im_file')

有人可以告诉我该怎么做吗?

python-2.7 python-imaging-library raspberry-pi3 framebuffer
1个回答
0
投票
最简单的方法是确保/tmp文件系统安装在tmpfs上,该文件系统完全基于内存,因此未写入SD卡。请注意,这意味着每次重新启动时内容都会丢失。
© www.soinside.com 2019 - 2024. All rights reserved.