diff --git a/app/config/gimpconfig-dump.c b/app/config/gimpconfig-dump.c index 81429f6ad7..06235ea0e6 100644 --- a/app/config/gimpconfig-dump.c +++ b/app/config/gimpconfig-dump.c @@ -313,6 +313,7 @@ static const gchar display_format_description[] = "%W image width in real-world units\n" "%h image height in pixels\n" "%H image height in real-world units\n" +"%M the image size expressed in megapixels\n" "%u unit symbol\n" "%U unit abbreviation\n\n"; diff --git a/app/display/gimpdisplayshell-title.c b/app/display/gimpdisplayshell-title.c index 3b9ed45ca6..0894d0fcae 100644 --- a/app/display/gimpdisplayshell-title.c +++ b/app/display/gimpdisplayshell-title.c @@ -324,9 +324,8 @@ gimp_display_shell_format_title (GimpDisplayShell *shell, case 'M': /* image size in megapixels */ i += print (title, title_len, i, "%.1f", - (double) gimp_image_get_width (image) * - gimp_image_get_height (image) / - 1000000.0); + (gdouble) gimp_image_get_width (image) * + (gdouble) gimp_image_get_height (image) / 1000000.0); break; case 'l': /* number of layers */ diff --git a/docs/gimprc.5.in b/docs/gimprc.5.in index c3915632a6..c248fb445d 100644 --- a/docs/gimprc.5.in +++ b/docs/gimprc.5.in @@ -513,6 +513,8 @@ certain % character sequences are recognised and expanded as follows: .br %H image height in real-world units .br +%M the image size expressed in megapixels +.br %u unit symbol .br %U unit abbreviation @@ -572,6 +574,8 @@ certain % character sequences are recognised and expanded as follows: .br %H image height in real-world units .br +%M the image size expressed in megapixels +.br %u unit symbol .br %U unit abbreviation diff --git a/etc/gimprc b/etc/gimprc index b1a7f2d2c4..9a3daabbe6 100644 --- a/etc/gimprc +++ b/etc/gimprc @@ -403,6 +403,7 @@ # %W image width in real-world units # %h image height in pixels # %H image height in real-world units +# %M the image size expressed in megapixels # %u unit symbol # %U unit abbreviation # @@ -435,6 +436,7 @@ # %W image width in real-world units # %h image height in pixels # %H image height in real-world units +# %M the image size expressed in megapixels # %u unit symbol # %U unit abbreviation #