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[-]width[/height] | -Edpi ] [ -Cxpos/ypos[/jus‐
10 tify] ] [ -Fpen ] [ -G[b|f|t]color ] [ -I ] [ -K ] [ -M ] [ -Nnx[/ny] ]
11 [ -O ] [ -P ] [ -U[just/dx/dy/][c|label] ] [ -V ] [ -X[a|c|r][x-
12 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. In case of 8-, 24- or 32-bit
23 Sun raster files, the user can select which color to be made transpar‐
24 ent. The user may also choose to replicate the image which, when pre‐
25 ceded by appropriate clip paths, may allow larger custom-designed fill
26 patterns to be implemented (the -Gp mechanism offered in most GMT pro‐
27 grams is limited to rasters smaller than 146 by 146).
28
29 imagefile
30 This must be an Encapsulated PostScript (EPS) file or a Sun
31 raster file. An EPS file must contain an appropriate Bounding‐
32 Box. A raster file can have a depth of 1, 8, 24, or 32 bits.
33 Old-style, Standard, Run-length-encoded, and RGB Sun raster
34 files are supported. Other raster formats can be converted to
35 Sun format via a variety of public-domain software (e.g., con‐
36 vert, xv).
37
38 -E Sets the dpi of the image in dots per inch, or use -W.
39
40 -W Sets the width (and height) of the image in plot coordinates
41 (inches, cm, etc.). If height is not given, the original aspect
42 ratio of the image is maintained. If width is negative we use
43 the absolute value and interpolate image to the device resolu‐
44 tion using the PostScript image operator. Alternatively, use
45 -E.
46
48 No space between the option flag and the associated arguments.
49
50 -C Sets position of the image in plot coordinates (inches, cm,
51 etc.) from the current origin of the plot. By default, this
52 defines the position of the lower left corner of the image, but
53 this can be changed by specifying justification [0/0/BL].
54
55 -F Draws a rectangular frame around the image with the given pen
56 [no frame]. (See SPECIFYING PENS below).
57
58 -K More PostScript code will be appended later [Default terminates
59 the plot system].
60
61 -M Convert color image to monochrome grayshades using the (televi‐
62 sion) YIQ-transformation.
63
64 -N Replicate the image nx times horizontally and ny times verti‐
65 cally. If ny is omitted, it will be identical to nx [Default is
66 1/1].
67
68 -O Selects Overlay plot mode [Default initializes a new plot sys‐
69 tem].
70
71 -P Selects Portrait plotting mode [Default is Landscape, see gmtde‐
72 faults to change this].
73
74 -U Draw Unix System time stamp on plot. By adding just/dx/dy/, the
75 user may specify the justification of the stamp and where the
76 stamp should fall on the page relative to lower left corner of
77 the plot. For example, BL/0/0 will align the lower left corner
78 of the time stamp with the lower left corner of the plot.
79 Optionally, append a label, or c (which will plot the command
80 string.). The GMT parameters UNIX_TIME, UNIX_TIME_POS, and
81 UNIX_TIME_FORMAT can affect the appearance; see the gmtdefaults
82 man page for details. The time string will be in the locale set
83 by the environment variable TZ (generally local time).
84
85 -V Selects verbose mode, which will send progress reports to stderr
86 [Default runs "silently"].
87
88 -X -Y Shift plot origin relative to the current origin by (x-shift,y-
89 shift) and optionally append the length unit (c, i, m, p). You
90 can prepend a to shift the origin back to the original position
91 after plotting, or prepend r [Default] to reset the current
92 origin to the new location. If -O is used then the default (x-
93 shift,y-shift) is (0,0), otherwise it is (r1i, r1i) or (r2.5c,
94 r2.5c). Alternatively, give c to align the center coordinate (x
95 or y) of the plot with the center of the page based on current
96 page size.
97
98 -c Specifies the number of plot copies. [Default is 1].
99
100 These options are for 1-bit Sun raster images only. They have no
101 effect when plotting other images or PostScript files.
102
103 -Gb Sets background color (replace white pixel) of 1-bit images.
104 Use - for transparency (and set -Gf to the desired color). (See
105 SPECIFYING COLOR below).
106
107 -Gf Sets foreground color (replace black pixel) of 1-bit images.
108 Use - for transparency (and set -Gb to the desired color). (See
109 SPECIFYING COLOR below).
110
111 -I Invert 1-bit image before plotting. This is what is done when
112 you use -GP in other GMT programs.
113
114 These options are for 8-, 24-, and 32-bit Sun raster images only. They
115 have no effect when plotting 1-bit images or PostScript files.
116
117 -Gt Assigns the color that is to be made transparent. Sun Raster
118 files do not support transparency, so indicate here which color
119 to be made transparent. (See SPECIFYING COLOR below).
120
121 SPECIFYING PENS
122 pen The attributes of lines and symbol outlines as defined by pen is
123 a comma delimetered list of width, color and texture, each of
124 which is optional. width can be indicated as a measure (points,
125 centimeters, inches) or as faint, thin[ner|nest], thick[er|est],
126 fat[ter|test], or obese. color specifies a gray shade or color
127 (see SPECIFYING COLOR below). texture is a combination of
128 dashes `-' and dots `.'.
129
130 SPECIFYING COLOR
131 color The color of lines, areas and patterns can be specified by a
132 valid color name; by a gray shade (in the range 0-255); by a
133 decimal color code (r/g/b, each in range 0-255; h-s-v, ranges
134 0-360, 0-1, 0-1; or c/m/y/k, each in range 0-1); or by a hexa‐
135 decimal color code (#rrggbb, as used in HTML). See the gmtcol‐
136 ors manpage for more information and a full list of color names.
137
139 To plot the image contained in the 8-bit raster file scanned_face.ras,
140 scaling it to 8 by 10 cm (thereby possibly changing the aspect ratio),
141 and making the white color transparent, use
142
143 psimage scanned_face.ras -W8c/10c -Gtwhite > image.ps
144
145 To include an Encapsulated PostScript file tiger.eps with its upper
146 right corner 2 inch to the right and 1 inch up from the current loca‐
147 tion, and have its width scaled to 3 inches, while keeping the aspect
148 ratio, use
149
150 psimage tiger.eps -C2i/1i/TR -W3i > image.ps
151
152 To replicate the 1-bit raster image template 1_bit.ras, colorize it
153 (brown background and red foreground), and setting each of 5 by 5 tiles
154 to be 1 cm wide, use
155
156 psimage 1_bit.ras -Gbbrown -Gfred -N5 -W1c > image.ps
157
159 GMT(1), gmtcolors(5), psxy(1)
160
161
162
163GMT 4.5.6 10 Mar 2011 PSIMAGE(1)