我正在尝试使用gimp 2.8.22的功能将pdf转换为jpeg,我想使用Windows cmd中的gimpfu库使用python脚本进行此操作(我已经安装了python 3.6.1)。
现在,我不尝试使用示例脚本来做到这一点:
#!/usr/bin/env python
# Hello World in GIMP Python
from gimpfu import *
def hello_world(initstr, font, size, color) :
# First do a quick sanity check on the font
if font == 'Comic Sans MS' :
initstr = "Comic Sans? Are you sure?"
# Make a new image. Size 10x10 for now -- we'll resize later.
img = gimp.Image(1, 1, RGB)
# Save the current foreground color:
pdb.gimp_context_push()
# Set the text color
gimp.set_foreground(color)
# Create …Run Code Online (Sandbox Code Playgroud)