Skip to content

Commit

Permalink
Update image rst (#8135)
Browse files Browse the repository at this point in the history
Same old
  • Loading branch information
PaulWessel authored Dec 5, 2023
1 parent 40178bb commit 8e1cb1a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 7 additions & 4 deletions doc/rst/source/image.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
4 changes: 2 additions & 2 deletions src/psimage.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <color>) depending on selected modifier (repeatable):");
GMT_Usage (API, 3, "+b Replace background color by <color> or make it transparent (1-bit images only).");
GMT_Usage (API, 3, "+f Replace foreground color by <color> or make it transparent (1-bit images only).");
GMT_Usage (API, 3, "+t Indicate the given <color> should be made transparent [no transparency].");
GMT_Usage (API, 3, "+t Indicate the given <color> 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.");
Expand Down Expand Up @@ -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';
Expand Down

0 comments on commit 8e1cb1a

Please sign in to comment.