1PSIMAGE(1) GMT PSIMAGE(1)
2
3
4
6 psimage - Place images or EPS files on maps
7
9 psimage imagefile [ -Drefpoint ] [ -Fbox ] [ -G[b|f|t]color ] [ -I
10 ] [ -Jparameters ] [ -Jz|Zparameters ] [ -K ] [ -M ] [ -O ] [ -P
11 ] [ -Rwest/east/south/north[/zmin/zmax][+r] ] [ -U[stamp] ] [
12 -V[level] ] [ -Xx_offset ] [ -Yy_offset ] [ -pflags ] [ -ttransp ]
13
14 Note: No space is allowed between the option flag and the associated
15 arguments.
16
18 psimage reads an Encapsulated PostScript file or a raster image file
19 and plots it on a map. The image can be scaled arbitrarily, and 1-bit
20 raster images can be (1) inverted, i.e., black pixels (on) becomes
21 white (off) and vice versa, or (2) colorized, by assigning different
22 foreground and background colors, and (3) made transparent where one of
23 back- or foreground is painted only. As an option, the user may choose
24 to convert colored raster images to grayscale using TV's YIQ-transfor‐
25 mation. For raster files, the user can select which color to be made
26 transparent. The user may also choose to replicate the image which,
27 when preceded by appropriate clip paths, may allow larger cus‐
28 tom-designed fill patterns to be implemented (the -Gp mechanism offered
29 in most GMT programs is limited to rasters smaller than 146 by 146).
30
32 imagefile
33 This must be an Encapsulated PostScript (EPS) file or a raster
34 image. An EPS file must contain an appropriate BoundingBox. A
35 raster file can have a depth of 1, 8, 24, or 32 bits and is read
36 via GDAL. Note: If GDAL was not configured during GMT installa‐
37 tion then only Sun raster files are supported natively. You
38 must then convert other formats to Sun raster files before use.
39
41 -D[g|j|J|n|x]refpoint+rdpi+w[-]width[/height][+jjustify][+nnx[/ny]
42 ][+odx[/dy]]
43 Sets reference point on the map for the image using one of four
44 coordinate systems: (1) Use -Dg for map (user) coordinates, (2)
45 use -Dj or -DJ for setting refpoint via a 2-char justification
46 code that refers to the (invisible) map domain rectangle, (3)
47 use -Dn for normalized (0-1) coordinates, or (4) use -Dx for
48 plot coordinates (inches, cm, etc.). All but -Dx requires both
49 -R and -J to be specified. By default, the anchor point on the
50 scale is assumed to be the bottom left corner (BL), but this can
51 be changed by appending +j followed by a 2-char justification
52 code justify (see pstext). Note: If -Dj is used then justify
53 defaults to the same as refpoint, if -DJ is used then justify
54 defaults to the mirror opposite of refpoint. Add +o to offset
55 the color scale by dx/dy away from the refpoint point in the
56 direction implied by justify (or the direction implied by -Dj or
57 -DJ). Specify image size in one of two ways: Use +rdpi to set
58 the dpi of the image in dots per inch, or use
59 +w[-]width[/height] to set the width (and height) of the image
60 in plot coordinates (inches, cm, etc.). If height is not given,
61 the original aspect ratio of the image is maintained. If width
62 is negative we use the absolute value and interpolate image to
63 the device resolution using the PostScript image operator.
64 Optionally, use +nnx[/ny] to replicate the image nx times hori‐
65 zontally and ny times vertically. If ny is omitted, it will be
66 identical to nx [Default is 1/1].
67
68 -F[+cclear‐
69 ances][+gfill][+i[[gap/]pen]][+p[pen]][+r[radius]][+s[[dx/dy/][shade]]]
70 Without further options, draws a rectangular border around the
71 image using MAP_FRAME_PEN; specify a different pen with +ppen.
72 Add +gfill to fill the image box [no fill]. Append +cclearance
73 where clearance is either gap, xgap/ygap, or lgap/rgap/bgap/tgap
74 where these items are uniform, separate in x- and y-direction,
75 or individual side spacings between scale and border. Append +i
76 to draw a secondary, inner border as well. We use a uniform gap
77 between borders of 2p and the MAP_DEFAULTS_PEN unless other val‐
78 ues are specified. Append +r to draw rounded rectangular borders
79 instead, with a 6p corner radius. You can override this radius
80 by appending another value. Finally, append +s to draw an offset
81 background shaded region. Here, dx/dy indicates the shift rela‐
82 tive to the foreground frame [4p/-4p] and shade sets the fill
83 style to use for shading [gray50].
84
85 -Jparameters (more ...)
86 Select map projection. (Used only with -p)
87
88 -Jz|Zparameters (more ...)
89 Set z-axis scaling; same syntax as -Jx.
90
91 -K (more ...)
92 Do not finalize the PostScript plot.
93
94 -M Convert color image to monochrome grayshades using the (televi‐
95 sion) YIQ-transformation.
96
97 -O (more ...)
98 Append to existing PostScript plot.
99
100 -P (more ...)
101 Select "Portrait" plot orientation.
102
103 -Rxmin/xmax/ymin/ymax[+r][+uunit] (more ...)
104 Specify the region of interest. (Used only with -p)
105
106 For perspective view p, optionally append /zmin/zmax. (more ...)
107
108 -U[[just]/dx/dy/][c|label] (more ...)
109 Draw GMT time stamp logo on plot.
110
111 -V[level] (more ...)
112 Select verbosity level [c].
113
114 -X[a|c|f|r][x-shift[u]]
115
116 -Y[a|c|f|r][y-shift[u]] (more ...)
117 Shift plot origin.
118
119 The following options are for 1-bit images only. They have no effect
120 when plotting other images or PostScript files.
121
122 -G[b|f|t]color
123
124 -Gb Sets background color (replace white pixel) of 1-bit
125 images. Use - for transparency (and set -Gf to the
126 desired color).
127
128 -Gf Sets foreground color (replace black pixel) of 1-bit
129 images. Use - for transparency (and set -Gb to the
130 desired color).
131
132 -I Invert 1-bit image before plotting. This is what is done when
133 you use -GP to invert patterns in other GMT plotting programs.
134
135 These options are for 8-, 24-, and 32-bit raster images only. They have
136 no effect when plotting 1-bit images or PostScript files.
137
138 -Gt Assigns the color that is to be made transparent. Sun Raster
139 files do not support transparency, so indicate here which color
140 to be made transparent.
141
142 -p[x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0] (more ...)
143 Select perspective view. (Requires -R and -J for proper func‐
144 tioning).
145
146 -t[transp] (more ...)
147 Set PDF transparency level in percent.
148
149 -^ or just -
150 Print a short message about the syntax of the command, then
151 exits (NOTE: on Windows just use -).
152
153 -+ or just +
154 Print an extensive usage (help) message, including the explana‐
155 tion of any module-specific option (but not the GMT common
156 options), then exits.
157
158 -? or no arguments
159 Print a complete usage (help) message, including the explanation
160 of all options, then exits.
161
162 gmt, pslegend, To plot the image logo.jpg, scaling it be 1 inch wide
163 (height is scaled accordingly), and outline with a thin, blue pen, use
164
165 gmt psimage logo.jpg -Dx0/0+w1i -F+pthin,blue > image.ps
166
167 To include an Encapsulated PostScript file tiger.eps with its upper
168 right corner 2 inch to the right and 1 inch up from the current loca‐
169 tion, and have its width scaled to 3 inches, while keeping the aspect
170 ratio, use
171
172 gmt psimage tiger.eps -Dx2i/1i+jTR+w3i > image.ps
173
174 To replicate the 1-bit raster image template 1_bit.ras, colorize it
175 (brown background and red foreground), and setting each of 5 by 5 tiles
176 to be 1 cm wide, use
177
178 gmt psimage 1_bit.ras -Gbbrown -Gfred -Dx0/0+w1c+n5 > image.ps
179
181 gmt, gmtcolors, gmtlogo pslegend, psscale psxy, convert(1)
182
184 2019, P. Wessel, W. H. F. Smith, R. Scharroo, J. Luis, and F. Wobbe
185
186
187
188
1895.4.5 Feb 24, 2019 PSIMAGE(1)