如何快速了解Gimp中的图层尺寸? [英] How to quickly know layer dimensions in Gimp?

查看:183
本文介绍了如何快速了解Gimp中的图层尺寸?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次我想知道Gimp中的图层尺寸时,我都会打开缩放图层"对话框来获取它.一目了然,有更好的方法吗?可能是一些配置选项,可将其显示在图层名称的底部/右侧或底部栏中...

Every time I want to know the layer dimensions in Gimp, I open the "Scale layer" dialog to get it. Is there a better way to know this at a glance? May be some configuration option to show it at the bottom/right of the layer name, or in the bottom bar...

也许这可能是Gimp功能的要求?

Maybe this could be a Gimp feature request?

谢谢!

推荐答案

GIMP确实可以配置状态栏(在首选项,图像窗口,标题和状态上)-但目前无法显示图层大小-

GIMP does have ways to configure the status bar (on prefences, image windows, title and status) - but there is currently no way to display the layer size -

可以提出一个功能请求-一方面,这是一项容易的任务,并且开始尝试与该项目合作的人可能会解决它.另一方面,该项目还缺乏开发的人力资源,在路线图上,已经完全摆脱了层级尺寸"(将来,它们应该只是自动扩展/收缩,在出口时可以选择)用于在需要时固定尺寸).无论如何,值得在bugzilla.gnome.org

It can be made a feature request - on one hand it is an easy task, and someone starting to trying to collaborate with the project might tackle it. Ont he other hand, the project suffers from lack of man power for development, and on the road map, there is already getting rid of "layer dimensions" altogether (in the future they should just expand/contract automatically, with options at export time for fixing sizes when needed). Anyway, it would be worth to reaquest this as a feature at bugzilla.gnome.org

现在可以通过编程的方式来编写一个小的python脚本,该脚本将使用文本输入小部件打开自己的GTK窗口,并在脚本上设置主循环(GIMP中的python插件在单独的进程中运行,因此他们可以有自己的主循环)-以一定的时间间隔调用以下内容:

What is possible to do programmatically now, is to write a small python script that would open its own GTK Window with text entry widgets, and set a main loop on the script (python Plug-ins in GIMP run in a separate process, so it is ok for they to have their own main loop) - to call at certain intervals something along:

layer = pdb.gimp_image.get_active_layer(img) 宽度= layer.width;高度= layer.height

layer = pdb.gimp_image.get_active_layer(img) width = layer.width; height = layer.height

并将这些值输入到您的窗口中.启动插件时将传递"img"参数,并且您必须为每个工作映像运行该实例的一个实例. (没有PDB调用即可在GIMP中获取活动图像).

And having those values fed to your window. The "img" parameter will be passed when you start the plug-in,a nd you will have to run one instance of it for each working image. (there is no PDB call to get the active image in GIMP).

更新 由OP打开错误请求后,该功能已在GIMP的开发分支中实现,并可以作为%x和%y代码使用,以在GIMP git master的状态/标题栏中使用(编辑->首选项->图像Windows->标题和状态).它应该从GIMP 2.10开始可用.

UPDATE After the bug request open by the OP, the feature was implemented in the development branch of GIMP and is available as %x and %y codes to be used in the status/title bar in the GIMP git master (edit->preferences->Image Windows->Title & Status). It should be available from GIMP 2.10 onwards.

更新 我发现,除了检查源代码之外,没有简单的方法来了解状态栏的可用代码.所以我在这里粘贴它们:

UPDATE I found out there is no easy way to get to know the available codes for status bar, short of checking the source code. So I am pasting them here:

%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中不可用)

(Please note that some of those may not available in GIMP 2.8)

这篇关于如何快速了解Gimp中的图层尺寸?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆