[gimp] app: Support 'M' for 'megapixels' in image title format string
- From: Martin Nordholts <martinn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: Support 'M' for 'megapixels' in image title format string
- Date: Thu, 30 Sep 2010 05:57:56 +0000 (UTC)
commit aa47dd22f0d8d498c80236303e0ac27210a4e675
Author: Bogdan Szczurek <thebodzio gmail com>
Date: Thu Sep 30 07:57:44 2010 +0200
app: Support 'M' for 'megapixels' in image title format string
app/display/gimpdisplayshell-title.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-title.c b/app/display/gimpdisplayshell-title.c
index f2880c8..2ef9504 100644
--- a/app/display/gimpdisplayshell-title.c
+++ b/app/display/gimpdisplayshell-title.c
@@ -322,6 +322,15 @@ gimp_display_shell_format_title (GimpDisplayShell *shell,
}
break;
+ case 'M': /* image size in megapixels */
+ {
+ i += print (title, title_len, i, "%.1f",
+ gimp_image_get_width (image) *
+ gimp_image_get_height (image) /
+ 1000000.0f);
+ }
+ break;
+
case 'l': /* number of layers */
i += print (title, title_len, i, "%d",
gimp_image_get_n_layers (image));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]