From 8e1cb1afc17ec47cd200936286ea5aa2b07a18ec Mon Sep 17 00:00:00 2001 From: Paul Wessel Date: Tue, 5 Dec 2023 16:30:56 +0100 Subject: [PATCH] Update image rst (#8135) Same old --- doc/rst/source/image.rst | 11 +++++++---- src/psimage.c | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/doc/rst/source/image.rst b/doc/rst/source/image.rst index ecb1bda5b36..63ede046195 100644 --- a/doc/rst/source/image.rst +++ b/doc/rst/source/image.rst @@ -104,10 +104,13 @@ Optional Arguments **-G**\ [*color*][**+b**\|\ **f**\|\ **t**] Change certain pixel values to another color or make them transparent. - For 1-bit images you can specify an alternate *color* for the background (**+b**) - or the foreground (**+f**) pixels, or give no color to make those pixels - transparent. Alternatively, for color images you can select a single *color* - that should be made transparent instead (**+t**). This option may be repeated with different settings. + + - **+b**: For 1-bit images you can specify an alternate *color* for the background pixels. + Give no color to make those pixels transparent. + - **+f**: For 1-bit images you can specify an alternate *color* for the foreground pixels. + Give no color to make those pixels transparent. + - **+t**: For color images you can select a single *color* that should be made transparent + instead. This option may be repeated with different settings. .. _-I: diff --git a/src/psimage.c b/src/psimage.c index 1c8901e1f9e..84178077ebc 100644 --- a/src/psimage.c +++ b/src/psimage.c @@ -117,7 +117,7 @@ static int usage (struct GMTAPI_CTRL *API, int level) { GMT_Usage (API, -2, "Change some pixels to be transparent (or to optional ) depending on selected modifier (repeatable):"); GMT_Usage (API, 3, "+b Replace background color by or make it transparent (1-bit images only)."); GMT_Usage (API, 3, "+f Replace foreground color by or make it transparent (1-bit images only)."); - GMT_Usage (API, 3, "+t Indicate the given should be made transparent [no transparency]."); + GMT_Usage (API, 3, "+t Indicate the given should be made transparent (for color images) [no transparency]."); GMT_Usage (API, 1, "\n-I Invert 1-bit images (does not affect 8 or 24-bit images)."); GMT_Option (API, "J-Z,K"); GMT_Usage (API, 1, "\n-M Force color -> monochrome image using YIQ-transformation."); @@ -219,7 +219,7 @@ static int parse (struct GMT_CTRL *GMT, struct PSIMAGE_CTRL *Ctrl, struct GMT_OP n_errors++; } break; - case 'G': /* Background/foreground color for 1-bit images */ + case 'G': /* Background/foreground color for 1-bit images [Repeatable] */ Ctrl->G.active = true; if ((p = strstr (opt->arg, "+b"))) /* Background color (or transparency) selected */ ind = PSIMAGE_BGD, k = 0, p[0] = '\0';