滤镜 -> Python Fu -> 控制台,复制粘贴下面代码。
然后 scale_image(800, 800) 图片自动缩放为 800*800 了
这个代码是傻傻的缩放,你可以把它改成按比例缩放

#!/usr/bin/env python

from threading import Thread
import time
from gimpfu import *
from __future__ import division

def scale_image(w, h):
    pdb.gimp_progress_init("Scaling Image...",None)
    time.sleep(0.5)
    thread = Thread(target = thread_scale_image, args = (w, h, ))
    thread.start()
    thread.join()


def thread_scale_image(w, h):
    image = gimp.image_list()[0]
    cur_w = image.width
    cur_h = image.height
    pdb.gimp_context_set_interpolation(INTERPOLATION_LANCZOS)
    pdb.gimp_image_scale(image, w, h)

https://gimpbook.com/scripting/

相关文章:

  • 2021-11-25
  • 2021-05-30
  • 2022-01-10
  • 2021-07-28
  • 2021-09-30
  • 2021-08-30
  • 2021-11-01
  • 2021-09-13
猜你喜欢
  • 2022-12-23
  • 2021-08-31
  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
  • 2022-01-02
相关资源
相似解决方案