GIMP 确实有方法配置状态栏(在首选项、图像窗口、标题和状态上) - 但目前无法显示图层大小 -
它可以提出一个功能请求 - 一方面,这是一项简单的任务,并且开始尝试与该项目协作的人可能会解决它。另一方面,该项目缺乏开发人力,并且在路线图上已经完全摆脱了“图层尺寸”(将来它们应该自动扩展/收缩,并在导出时提供选项)用于在需要时固定尺寸)。无论如何,值得在 bugzilla.gnome.org 上请求将此作为一项功能
现在可以以编程方式执行的操作是编写一个小的 python 脚本,该脚本将使用文本输入小部件打开自己的 GTK 窗口,并在脚本上设置主循环(GIMP 中的 python 插件在单独的进程中运行,因此它他们有自己的主循环是可以的)-以一定的间隔调用一些东西:
层 = pdb.gimp_image.get_active_layer(img)
宽度=层.宽度;高度 = 图层高度
并将这些值输入到您的窗口。当您启动插件时,将传递“img”参数,并且您必须为每个工作图像运行一个实例。 (没有 PDB 调用来获取 GIMP 中的活动图像)。
UPDATE在 OP 提出错误请求后,该功能在 GIMP 的开发分支中实现,并可作为 %x 和 %y 代码在 GIMP git master 的状态/标题栏中使用(编辑->首选项->图像窗口->标题和状态)。它应该从 GIMP 2.10 开始可用。
UPDATE我发现除了检查源代码之外,没有简单的方法可以了解状态栏的可用代码。所以我把它们粘贴在这里:
%f: base filename
%F: full filename
%p: PDB id
%i: instance
%t: image type
%T: drawable type
%s: user source zoom factor
%d: user destination zoom factor
%z: user zoom factor (percentage)
%D: dirty flag
%C: clean flag
%B: dirty flag (long)
%A: clean flag (long)
%m: memory used by image
%M: image size in megapixels
%l: number of layers
%L: number of layers (long)
%n: active drawable name
%P: active drawable PDB id
%W: width in real-world units
%w: width in pixels
%H: height in real-world units
%h: height in pixels
%u: unit symbol
%U: unit abbreviation
%X: drawable width in real world units
%x: drawable width in pixels
%Y: drawable height in real world units
%y: drawable height in pixels
%o: image's color profile name
%e: view offsets in pixels
%r: view rotation angle in degrees
(请注意,其中一些可能在 GIMP 2.8 中不可用)