.TH PSIMAGE 1gmt "Feb 27 2014" "GMT 4.5.13 (SVN)" "Generic Mapping Tools" .SH NAME psimage \- To plot images (EPS files or Sun raster files) on maps .SH SYNOPSIS \fBpsimage\fP \fIimagefile\fP [ \fB\-W\fP[\fB-\fP]\fIwidth\fP[/\fIheight\fP] | \fB\-E\fP\fIdpi\fP ] [ \fB\-C\fP\fIxpos\fP/\fIypos\fP[/\fIjustify\fP] ] [ \fB\-F\fP\fIpen\fP ] [ \fB\-G\fP[\fBb\fP|\fBf\fP|\fBt\fP]\fIcolor\fP ] [ \fB\-I\fP ] [ \fB\-K\fP ] [ \fB\-M\fP ] [ \fB\-N\fP\fInx\fP[/\fIny\fP] ] [ \fB\-O\fP ] [ \fB\-P\fP ] [ \fB\-U\fP[\fIjust\fP/\fIdx\fP/\fIdy\fP/][\fBc\fP|\fIlabel\fP] ] [ \fB\-V\fP ] [ \fB\-X\fP[\fBa\fP|\fBc\fP|\fBr\fP][\fIx-shift\fP[\fBu\fP]] ] [ \fB\-Y\fP[\fBa\fP|\fBc\fP|\fBr\fP][\fIy-shift\fP[\fBu\fP]] ] [ \fB\-c\fP\fIcopies\fP ] .SH DESCRIPTION \fBpsimage\fP reads an Encapsulated \fIPostScript\fP\fR file or a 1, 8, 24, or 32-bit Sun raster file and plots it on a map. The image can be scaled arbitrarily, and 1-bit raster images can be (1) inverted, i.e., black pixels (on) becomes white (off) and vice versa, or (2) colorized, by assigning different foreground and background colors, and (3) made transparent where one of back- or foreground is painted only. As an option, the user may choose to convert colored raster images to grayscale using TV's YIQ-transformation.\"' In case of 8-, 24- or 32-bit Sun raster files, the user can select which color to be made transparent. The user may also choose to replicate the image which, when preceded by appropriate clip paths, may allow larger custom-designed fill patterns to be implemented (the \fB\-Gp\fP mechanism offered in most \fBGMT\fP programs is limited to rasters smaller than 146 by 146). .TP \fIimagefile\fP This must be an Encapsulated \fIPostScript\fP\fR (EPS) file or a Sun raster file. An EPS file must contain an appropriate BoundingBox. A raster file can have a depth of 1, 8, 24, or 32 bits. Old-style, Standard, Run-length-encoded, and RGB Sun raster files are supported. Other raster formats can be converted to Sun format via a variety of public-domain software (e.g., convert, xv). .TP \fB\-E\fP Sets the dpi of the image in dots per inch, or use \fB\-W\fP. .TP \fB\-W\fP Sets the width (and height) of the image in plot coordinates (inches, cm, etc.). If \fIheight\fP is not given, the original aspect ratio of the image is maintained. If \fIwidth\fP is negative we use the absolute value and interpolate image to the device resolution using the \fIPostScript\fP image operator. Alternatively, use \fB\-E\fP. .SH OPTIONS No space between the option flag and the associated arguments. .TP \fB\-C\fP Sets position of the image in plot coordinates (inches, cm, etc.) from the current origin of the plot. By default, this defines the position of the lower left corner of the image, but this can be changed by specifying justification [0/0/BL]. .TP \fB\-F\fP Draws a rectangular frame around the image with the given pen [no frame]. (See SPECIFYING PENS below). .TP \fB\-K\fP More \fIPostScript\fP code will be appended later [Default terminates the plot system]. .TP \fB\-M\fP Convert color image to monochrome grayshades using the (television) YIQ-transformation. .TP \fB\-N\fP Replicate the image \fInx\fP times horizontally and \fIny\fP times vertically. If \fIny\fP is omitted, it will be identical to \fInx\fP [Default is 1/1]. .TP \fB\-O\fP Selects Overlay plot mode [Default initializes a new plot system]. .TP \fB\-P\fP Selects Portrait plotting mode [Default is Landscape, see \fBgmtdefaults\fP to change this]. .TP \fB\-U\fP Draw Unix System time stamp on plot. By adding \fIjust/dx/dy/\fP, the user may specify the justification of the stamp and where the stamp should fall on the page relative to lower left corner of the plot. For example, BL/0/0 will align the lower left corner of the time stamp with the lower left corner of the plot. Optionally, append a \fIlabel\fP, or \fBc\fP (which will plot the command string.). The \fBGMT\fP parameters \fBUNIX_TIME\fP, \fBUNIX_TIME_POS\fP, and \fBUNIX_TIME_FORMAT\fP can affect the appearance; see the \fBgmtdefaults\fP man page for details. The time string will be in the locale set by the environment variable \fBTZ\fP (generally local time). .TP \fB\-V\fP Selects verbose mode, which will send progress reports to stderr [Default runs "silently"]. .TP \fB\-X\fP \fB\-Y\fP Shift plot origin relative to the current origin by (\fIx-shift,y-shift\fP) and optionally append the length unit (\fBc\fP, \fBi\fP, \fBm\fP, \fBp\fP). You can prepend \fBa\fP to shift the origin back to the original position after plotting, or prepend \fBr\fP [Default] to reset the current origin to the new location. If \fB\-O\fP is used then the default (\fIx-shift,y-shift\fP) is (0,0), otherwise it is (r1i, r1i) or (r2.5c, r2.5c). Alternatively, give \fBc\fP to align the center coordinate (x or y) of the plot with the center of the page based on current page size. .TP \fB\-c\fP Specifies the number of plot copies. [Default is 1]. .P These options are for 1-bit Sun raster images only. They have no effect when plotting other images or PostScript files. .TP \fB\-Gb\fP Sets background color (replace white pixel) of 1-bit images. Use - for transparency (and set \fB\-Gf\fP to the desired color). (See SPECIFYING COLOR below). .TP \fB\-Gf\fP Sets foreground color (replace black pixel) of 1-bit images. Use - for transparency (and set \fB\-Gb\fP to the desired color). (See SPECIFYING COLOR below). .TP \fB\-I\fP Invert 1-bit image before plotting. This is what is done when you use \fB\-GP\fP in other GMT programs. .P These options are for 8-, 24-, and 32-bit Sun raster images only. They have no effect when plotting 1-bit images or PostScript files. .TP \fB\-Gt\fP Assigns the color that is to be made transparent. Sun Raster files do not support transparency, so indicate here which color to be made transparent. (See SPECIFYING COLOR below). .SS SPECIFYING PENS .TP \fIpen\fP The attributes of lines and symbol outlines as defined by \fIpen\fP is a comma delimetered list of \fIwidth\fP, \fIcolor\fP and \fItexture\fP, each of which is optional. \fIwidth\fP can be indicated as a measure (points, centimeters, inches) or as \fBfaint\fP, \fBthin\fP[\fBner\fP|\fBnest\fP], \fBthick\fP[\fBer\fP|\fBest\fP], \fBfat\fP[\fBter\fP|\fBtest\fP], or \fBobese\fP. \fIcolor\fP specifies a gray shade or color (see SPECIFYING COLOR below). \fItexture\fP is a combination of dashes `-' and dots `.'. .SS SPECIFYING COLOR .TP \fIcolor\fP The \fIcolor\fP of lines, areas and patterns can be specified by a valid color name; by a gray shade (in the range 0\-255); by a decimal color code (r/g/b, each in range 0\-255; h-s-v, ranges 0\-360, 0\-1, 0\-1; or c/m/y/k, each in range 0\-1); or by a hexadecimal color code (#rrggbb, as used in HTML). See the \fBgmtcolors\fP manpage for more information and a full list of color names. .SH EXAMPLES To plot the image contained in the 8-bit raster file scanned_face.ras, scaling it to 8 by 10 cm (thereby possibly changing the aspect ratio), and making the white color transparent, use .br .sp \fBpsimage\fP scanned_face.ras \fB\-W\fP 8\fBc\fP/10\fBc\fP -Gtwhite > image.ps .br .sp To include an Encapsulated \fIPostScript\fP file tiger.eps with its upper right corner 2 inch to the right and 1 inch up from the current location, and have its width scaled to 3 inches, while keeping the aspect ratio, use .br .sp \fBpsimage\fP tiger.eps \fB\-C\fP 2\fBi\fP/1\fBi\fP/TR \fB\-W\fP 3\fBi\fP > image.ps .br .sp To replicate the 1-bit raster image template 1_bit.ras, colorize it (brown background and red foreground), and setting each of 5 by 5 tiles to be 1 cm wide, use .br .sp \fBpsimage\fP 1_bit.ras \fB\-Gb\fP brown \fB\-Gf\fP red \fB\-N\fP 5 \fB\-W\fP 1\fBc\fP > image.ps .SH "SEE ALSO" .IR GMT (1), .IR gmtcolors (5), .IR psxy (1)