📜  Pgmagick write() 方法Python

📅  最后修改于: 2022-05-13 01:55:15.187000             🧑  作者: Mango

Pgmagick write() 方法Python

write()函数是 Pgmagick 库中的一个内置函数,用于写入中间图像。当前图像被写入指定的文件名,然后使用该图像继续处理。

示例 1:

write(filename)

输出:

示例 2:

from pgmagick import Image, DrawableCircle, DrawableText
from pgmagick import Geometry, Color
  
# draw the image of dimension 600 * 600
img = Image((600, 600), "gradient:# ffffff-# 12323e")
  
# invoke write function along with filename
img.write('1_a.png')

输出:

参考:

  • http://www.graphicsmagick.org/Magick++/