1PSIMAGE(1) Generic Mapping Tools PSIMAGE(1)
2
3
4
6 psimage - To plot images (EPS files or Sun raster files) on maps
7
9 psimage imagefile [ -W[-]xlength[/ylength] | -Edpi ] [
10 -Cxpos/ypos[/justify] ] [ -Fpen ] [ -G[f|b]color ] [ -I ] [ -K ] [ -M ]
11 [ -Nnxrep[/nyrep] ] [ -O ] [ -P ] [ -U[just/dx/dy/][c|label] ] [ -V ] [
12 -X[a|c|r][x-shift[u]] ] [ -Y[a|c|r][y-shift[u]] ] [ -ccopies ]
13
15 psimage reads an Encapsulated PostScript file or a 1, 8, 24, or 32-bit
16 Sun raster file and plots it on a map. The image can be scaled arbi‐
17 trarily, and 1-bit raster images can be (1) inverted, i.e., black pix‐
18 els (on) becomes white (off) and vice versa, or (2) colorized, by
19 assigning different foreground and background colors, and (3) made
20 transparent where one of back- or foreground is painted only. As an
21 option, the user may choose to convert colored raster images to
22 grayscale using TV's YIQ-transformation. The user may also choose to
23 replicate the image which, when preceded by appropriate clip paths, may
24 allow larger custom-designed fill patterns to be implemented (the -Gp
25 mechanism offered in most GMT programs is limited to rasters smaller
26 than 146 by 146).
27
28 imagefile
29 This must be an Encapsulated PostScript (EPS) file or a Sun
30 raster file. An EPS file must contain an appropriate Bounding‐
31 Box. A raster file can have a depth of 1, 8, 24, or 32 bits.
32 Old-style, Standard, Run-length-encoded, and RGB Sun raster
33 files are supported. Other raster formats can be converted to
34 Sun format via a variety of public-domain software (e.g., con‐
35 vert, xv).
36
37 -E Sets the dpi of the image in dots per inch, or use -W.
38
39 -W Sets the size of the image in plot coordinates (inches, cm,
40 etc.). If not given ylength is set to xlength * (ny/nx). If
41 xlength is negative we use the absolute value and interpolate
42 image to the device resolution using the PostScript image opera‐
43 tor. Alternatively, use -E.
44
46 No space between the option flag and the associated arguments.
47
48 -C Sets position of the image in plot coordinates (inches, cm,
49 etc.) from the current origin of the plot. By default, this
50 defines the position of the lower left corner of the image, but
51 this can be changed by specifying justification [0/0/BL].
52
53 -F Draws a rectangular frame around the image with the given pen
54 [no frame]. (See SPECIFYING PENS below).
55
56 -Gb Sets background color (replace white pixel) for 1-bit image tem‐
57 plates. Use - for transparency (and set -Gf to the desired
58 color). (See SPECIFYING COLOR below).
59
60 -Gf Sets foreground color (replace black pixel) for 1-bit image tem‐
61 plates. Use - for transparency (and set -Gb to the desired
62 color). (See SPECIFYING COLOR below).
63
64 -I Invert image before plotting (1-bit images only). This is what
65 is done when you use -GP in other GMT programs.
66
67 -K More PostScript code will be appended later [Default terminates
68 the plot system].
69
70 -M Convert color image to monochrome grayshades using the (televi‐
71 sion) YIQ-transformation.
72
73 -N Replicate the image nxrep in x and nyrep in y [Default is 1/1].
74
75 -O Selects Overlay plot mode [Default initializes a new plot sys‐
76 tem].
77
78 -P Selects Portrait plotting mode [Default is Landscape, see gmtde‐
79 faults to change this].
80
81 -U Draw Unix System time stamp on plot. By adding just/dx/dy/, the
82 user may specify the justification of the stamp and where the
83 stamp should fall on the page relative to lower left corner of
84 the plot. For example, BL/0/0 will align the lower left corner
85 of the time stamp with the lower left corner of the plot.
86 Optionally, append a label, or c (which will plot the command
87 string.). The GMT parameters UNIX_TIME, UNIX_TIME_POS, and
88 UNIX_TIME_FORMAT can affect the appearance; see the gmtdefaults
89 man page for details. The time string will be in the locale set
90 by the environment variable TZ (generally local time).
91
92 -V Selects verbose mode, which will send progress reports to stderr
93 [Default runs "silently"].
94
95 -X -Y Shift plot origin relative to the current origin by (x-shift,y-
96 shift) and optionally append the length unit (c, i, m, p). You
97 can prepend a to shift the origin back to the original position
98 after plotting, or prepend r [Default] to reset the current
99 origin to the new location. If -O is used then the default (x-
100 shift,y-shift) is (0,0), otherwise it is (r1i, r1i) or (r2.5c,
101 r2.5c). Alternatively, give c to align the center coordinate (x
102 or y) of the plot with the center of the page based on current
103 page size.
104
105 -c Specifies the number of plot copies. [Default is 1].
106
107 SPECIFYING PENS
108 pen The attributes of lines and symbol outlines as defined by pen is
109 a comma delimetered list of width, color and texture, each of
110 which is optional. width can be indicated as a measure (points,
111 centimeters, inches) or as faint, thin[ner|nest], thick[er|est],
112 fat[ter|test], or obese. color specifies a grey shade or color
113 (see SPECIFYING COLOR below). texture is a combination of
114 dashes `-' and dots `.'.
115
116 SPECIFYING COLOR
117 color The color of lines, areas and patterns can be specified by a
118 valid color name; by a grey shade (in the range 0-255); by a
119 decimal color code (r/g/b, each in range 0-255; h-s-v, ranges
120 0-360, 0-1, 0-1; or c/m/y/k, each in range 0-1); or by a hexa‐
121 decimal color code (#rrggbb, as used in HTML). See the gmtcol‐
122 ors manpage for more information and a full list of color names.
123
125 To plot the image contained in the 8-bit raster file scanned_face.ras,
126 scaling it to 8 by 10 cm, use
127
128 psimage scanned_face.ras -W8c/10c > image.ps
129
130 To include an Encapsulated PostScript file tiger.eps with its upper
131 right corner 2 inch to the right and 1 inch up from the current loca‐
132 tion, and have its width scaled to 3 inches, use
133
134 psimage tiger.eps -C2i/1i/TR -W3i > image.ps
135
136 To replicate the image template 1_bit.ras over a 5 by 5 inch area, col‐
137 orize it (brown background and red foreground), and setting each piece
138 to be 1 by 1 cm, use
139
140 psimage 1_bit.ras -Gbbrown -Gfred -N5i/5i -W1c > image.ps
141
143 GMT(1)
144
145
146
147GMT 4.3.1 15 May 2008 PSIMAGE(1)