Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

image_common.rst_ 5.2 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
  1. |No-spaces|
  2. Description
  3. -----------
  4. **image** reads an Encapsulated PostScript file or a raster image
  5. file and plots it on a map. The image can be scaled arbitrarily, and
  6. 1-bit raster images can be (1) inverted, i.e., black
  7. pixels (on) becomes white (off) and vice versa, or
  8. (2) colorized, by assigning different foreground and
  9. background colors, and (3) made transparent where one of
  10. back- or foreground is painted only. As an option, the user may choose
  11. to convert colored raster images to grayscale using TV's
  12. YIQ-transformation. For raster files, the user can select which color to
  13. be made transparent. The user may also choose to replicate the image
  14. which, when preceded by appropriate clip paths, may allow larger
  15. custom-designed fill patterns to be implemented (the **-Gp** mechanism
  16. offered in most GMT programs is limited to rasters smaller than 146
  17. by 146).
  18. Required Arguments
  19. ------------------
  20. *imagefile*
  21. This must be an Encapsulated PostScript (EPS) file or a raster
  22. image. An EPS file must contain an appropriate BoundingBox. A raster
  23. file can have a depth of 1, 8, 24, or 32 bits and is read via GDAL.
  24. **Note**: If GDAL was not configured during GMT installation then only
  25. EPS files are supported.
  26. Optional Arguments
  27. ------------------
  28. .. _-D:
  29. **-D**\ [**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\ **+r**\ *dpi*\ **+w**\ [**-**]\ *width*\ [/*height*]\ [**+j**\ *justify*]\ [**+n**\ *nx*\ [/*ny*] ]\ [**+o**\ *dx*\ [/*dy*]]
  30. Sets reference point on the map for the image using one of four coordinate systems:
  31. .. include:: explain_refpoint.rst_
  32. By default, the anchor point on the scale is assumed to be the bottom left corner (BL), but this
  33. can be changed by appending **+j** followed by a 2-char justification code *justify* (see :doc:`text`).
  34. **Note**: If **-Dj** is used then *justify* defaults to the same as *refpoint*,
  35. if **-DJ** is used then *justify* defaults to the mirror opposite of *refpoint*.
  36. Specify image size in one of two ways:
  37. Use **+r**\ *dpi* to set the dpi of the image in dots per inch, or use
  38. **+w**\ [**-**]\ *width*\ [/*height*] to
  39. set the width (and height) of the image in plot coordinates
  40. (inches, cm, etc.). If *height* is not given, the original aspect
  41. ratio of the image is maintained. If *width* is negative we use the
  42. absolute value and interpolate image to the device resolution using
  43. the PostScript image operator. Optionally, use **+n**\ *nx*\ [/*ny*] to
  44. replicate the image *nx* times horizontally and *ny* times
  45. vertically. If *ny* is omitted, it will be identical to *nx* [Default is 1/1].
  46. .. _-F:
  47. **-F**\ [**+c**\ *clearances*][**+g**\ *fill*][**+i**\ [[*gap*/]\ *pen*]][**+p**\ [*pen*]][**+r**\ [*radius*]][**+s**\ [[*dx*/*dy*/][*shade*]]]
  48. Without further options, draws a rectangular border around the image using
  49. :term:`MAP_FRAME_PEN`; specify a different pen with **+p**\ *pen*.
  50. Add **+g**\ *fill* to fill the image box [no fill].
  51. Append **+c**\ *clearance* where *clearance* is either *gap*, *xgap*\ /\ *ygap*,
  52. or *lgap*\ /\ *rgap*\ /\ *bgap*\ /\ *tgap* where these items are uniform, separate in
  53. x- and y-direction, or individual side spacings between scale and border.
  54. Append **+i** to draw a secondary, inner border as well. We use a uniform
  55. *gap* between borders of 2\ **p** and the :term:`MAP_DEFAULT_PEN`
  56. unless other values are specified. Append **+r** to draw rounded
  57. rectangular borders instead, with a 6\ **p** corner radius. You can
  58. override this radius by appending another value. Finally, append
  59. **+s** to draw an offset background shaded region. Here, *dx*/*dy*
  60. indicates the shift relative to the foreground frame
  61. [4\ **p**/-4\ **p**] and *shade* sets the fill style to use for shading [gray50].
  62. .. _-G:
  63. **-G**\ [*color*][**+b**\|\ **f**\|\ **t**]
  64. Change certain pixel values to another color or make them transparent.
  65. For 1-bit images you can specify an alternate *color* for the background (**+b**)
  66. or the foreground (**+f**) pixels, or give no color to make those pixels
  67. transparent. Alternatively, for color images you can select a single *color*
  68. that should be made transparent instead (**+t**).
  69. .. _-I:
  70. **-I**
  71. Invert 1-bit image before plotting. This is what is done when you
  72. use **-GP** to invert patterns in other GMT plotting programs. Ignored
  73. if used with color images.
  74. .. _-J:
  75. .. |Add_-J| replace:: (Used only with **-p**)
  76. .. include:: explain_-J.rst_
  77. .. _-M:
  78. **-M**
  79. Convert color image to monochrome grayshades using the (television)
  80. YIQ-transformation.
  81. .. _-R:
  82. .. |Add_-R| replace:: (Used only with **-p**)
  83. .. include:: explain_-R.rst_
  84. .. |Add_-Rz| unicode:: 0x20 .. just an invisible code
  85. .. include:: explain_-Rz.rst_
  86. .. _-U:
  87. .. include:: explain_-U.rst_
  88. .. _-V:
  89. .. |Add_-V| unicode:: 0x20 .. just an invisible code
  90. .. include:: explain_-V.rst_
  91. .. _-X:
  92. .. include:: explain_-XY.rst_
  93. .. |Add_perspective| replace:: (Requires **-R** and **-J** for proper functioning).
  94. .. include:: explain_perspective.rst_
  95. .. include:: explain_-t.rst_
  96. .. include:: explain_help.rst_
  97. Notes
  98. -----
  99. The **-G** and **-I** options are for raster images only. They have
  100. no effect when placing Encapsulated *PostScript* files.
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...