PageRenderTime 57ms CodeModel.GetById 26ms RepoModel.GetById 1ms app.codeStats 0ms

/ImageMagick/script/composite.html

https://gitlab.com/ImageMagick/ImageMagick
HTML | 522 lines | 504 code | 18 blank | 0 comment | 0 complexity | 0ef0eb8de6e66d8ea5ac66bef3a19cec MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
  5. <title>ImageMagick: Command-line Tools: Composite</title>
  6. <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
  7. <meta name="application-name" content="ImageMagick"/>
  8. <meta name="description" content="ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves."/>
  9. <meta name="application-url" content="http://www.imagemagick.org"/>
  10. <meta name="generator" content="PHP"/>
  11. <meta name="keywords" content="command-line, tools:, composite, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert"/>
  12. <meta name="rating" content="GENERAL"/>
  13. <meta name="robots" content="INDEX, FOLLOW"/>
  14. <meta name="generator" content="ImageMagick Studio LLC"/>
  15. <meta name="author" content="ImageMagick Studio LLC"/>
  16. <meta name="revisit-after" content="2 DAYS"/>
  17. <meta name="resource-type" content="document"/>
  18. <meta name="copyright" content="Copyright (c) 1999-2015 ImageMagick Studio LLC"/>
  19. <meta name="distribution" content="Global"/>
  20. <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1"/>
  21. <link rel="icon" href="../image/wand.png"/>
  22. <link rel="shortcut icon" href="../image/wand.ico"/>
  23. <link rel="stylesheet" href="../css/magick.php"/>
  24. </head>
  25. <body>
  26. <div class="main">
  27. <div class="magick-masthead">
  28. <div class="container">
  29. <script async="async" src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle"
  30. style="display:block"
  31. data-ad-client="ca-pub-3129977114552745"
  32. data-ad-slot="6345125851"
  33. data-ad-format="auto"></ins>
  34. <script>
  35. (adsbygoogle = window.adsbygoogle || []).push({});
  36. </script>
  37. <nav class="magick-nav">
  38. <a class="magick-nav-item " href="../index.php">Home</a>
  39. <a class="magick-nav-item " href="binary-releases.php">Download</a>
  40. <a class="magick-nav-item " href="command-line-tools.php">Tools</a>
  41. <a class="magick-nav-item " href="command-line-processing.php">Command-line</a>
  42. <a class="magick-nav-item " href="resources.php">Resources</a>
  43. <a class="magick-nav-item " href="api.php">Develop</a>
  44. <a class="magick-nav-item " href="search.php">Search</a>
  45. <a class="magick-nav-item pull-right" href="http://www.imagemagick.org/discourse-server/">Community</a>
  46. </nav>
  47. </div>
  48. </div>
  49. <div class="container">
  50. <div class="magick-header">
  51. <p class="text-center"><a href="composite.php#usage">Example Usage</a> <a href="composite.php#options">Option Summary</a></p>
  52. <p class="lead magick-description">Use the <code>composite</code> program to overlap one image over another. See <a href="command-line-processing.php">Command Line Processing</a> for advice on how to structure your <code>composite</code> command or see below for example usages of the command.</p>
  53. <h2 class="magick-header"><a id="usage"></a>Example Usage</h2>
  54. <p>We list a few examples of the <code>composite</code> command here to illustrate its usefulness and ease of use. To get started, lets overlay a smiley face over a rose:</p>
  55. <pre>
  56. composite -gravity center smile.gif rose: rose-over.png
  57. </pre>
  58. <ul>
  59. <a href="../image/smile.gif"><img src="../image/smile.gif" width="48" height="48" alt="smile" /></a>
  60. <img src="../image/over.gif" width="56" height="46" alt="over" />
  61. <a href="../image/rose.jpg"><img src="../image/rose.jpg" width="70" height="46" alt="rose" /></a>
  62. <img style="margin-top:13px; margin-bottom:13px;" src="../image/right.gif" width="20" height="20" alt="==>" />
  63. <a href="../image/rose-over.png"><img src="../image/rose-over.png" width="70" height="46" alt="rose" /></a>
  64. </ul>
  65. <p>You can create three-dimensional effect with the <var>Atop</var>:</p>
  66. <pre>
  67. convert -size 70x70 canvas:none -fill red -draw 'circle 35,35 10,30' red-circle.png
  68. convert -size 70x70 canvas:none -draw 'circle 35,35 35,20' -negate \
  69. -channel A -gaussian-blur 0x8 white-highlight.png
  70. composite -compose atop -geometry -13-17 white-highlight.png red-circle.png red-ball.png
  71. </pre>
  72. <ul>
  73. <a href="../image/white-highlight.png"><img src="../image/white-highlight.png" width="70" height="70" alt="white highlight" /></a>
  74. <img src="../image/atop.gif" width="56" height="70" alt="atop" />
  75. <a href="../image/red-circle.png"><img src="../image/red-circle.png" width="70" height="70" alt="red circle" /></a>
  76. <img style="margin-top:25px; margin-bottom:25px;" src="../image/right.gif" width="20" height="20" alt="==>" />
  77. <a href="../image/red-ball.png"><img src="../image/red-ball.png" width="70" height="70" alt="red ball" /></a>
  78. </ul>
  79. <p>You can find additional examples of using <code>composite</code> in <a href="http://www.imagemagick.org/Usage/">Examples of ImageMagick Usage</a>. You can find out more about them and the mathematics by looking at <a href="http://www.w3.org/TR/SVG12/rendering.html">SVG Alpha Compositing</a></p>
  80. <h2 class="magick-header"><a id="options"></a>Option Summary</h2>
  81. <p>The <code>composite</code> command recognizes these options. Click on an option to get more details about how that option works.</p>
  82. <table class="table table-condensed table-striped">
  83. <tbody>
  84. <tr>
  85. <th align="left">Option</th>
  86. <th align="left">Description</th>
  87. </tr>
  88. <tr>
  89. <td><a href="command-line-options.php#affine">-affine <var>matrix</var></a></td>
  90. <td>affine transform matrix</td>
  91. </tr>
  92. <tr>
  93. <td><a href="command-line-options.php#alpha">-alpha</a></td>
  94. <td>on, activate, off, deactivate, set, opaque, copy",
  95. transparent, extract, background, or shape the alpha channel</td>
  96. </tr>
  97. <tr>
  98. <td><a href="command-line-options.php#authenticate">-authenticate <var>value</var></a></td>
  99. <td>decrypt image with this password</td>
  100. </tr>
  101. <tr>
  102. <td><a href="command-line-options.php#blend">-blend <var>geometry</var></a></td>
  103. <td>blend images</td>
  104. </tr>
  105. <tr>
  106. <td><a href="command-line-options.php#blue-primary">-blue-primary <var>point</var></a></td>
  107. <td>chromaticity blue primary point</td>
  108. </tr>
  109. <tr>
  110. <td><a href="command-line-options.php#border">-border <var>geometry</var></a></td>
  111. <td>surround image with a border of color</td>
  112. </tr>
  113. <tr>
  114. <td><a href="command-line-options.php#bordercolor">-bordercolor <var>color</var></a></td>
  115. <td>border color</td>
  116. </tr>
  117. <tr>
  118. <td><a href="command-line-options.php#channel">-channel <var>type</var></a></td>
  119. <td>apply option to select image channels</td>
  120. </tr>
  121. <tr>
  122. <td><a href="command-line-options.php#colors">-colors <var>value</var></a></td>
  123. <td>preferred number of colors in the image</td>
  124. </tr>
  125. <tr>
  126. <td><a href="command-line-options.php#colorspace">-colorspace <var>type</var></a></td>
  127. <td>set image colorspace</td>
  128. </tr>
  129. <tr>
  130. <td><a href="command-line-options.php#comment">-comment <var>string</var></a></td>
  131. <td>annotate image with comment</td>
  132. </tr>
  133. <tr>
  134. <td><a href="command-line-options.php#compose">-compose <var>operator</var></a></td>
  135. <td>set image composite operator</td>
  136. </tr>
  137. <tr>
  138. <td><a href="command-line-options.php#compress">-compress <var>type</var></a></td>
  139. <td>image compression type</td>
  140. </tr>
  141. <tr>
  142. <td><a href="command-line-options.php#debug">-debug <var>events</var></a></td>
  143. <td>display copious debugging information</td>
  144. </tr>
  145. <tr>
  146. <td><a href="command-line-options.php#decipher">-decipher <var>filename</var></a></td>
  147. <td>convert cipher pixels to plain</td>
  148. </tr>
  149. <tr>
  150. <td><a href="command-line-options.php#define">-define <var>format:option</var></a></td>
  151. <td>define one or more image format options</td>
  152. </tr>
  153. <tr>
  154. <td><a href="command-line-options.php#density">-density <var>geometry</var></a></td>
  155. <td>horizontal and vertical density of the image</td>
  156. </tr>
  157. <tr>
  158. <td><a href="command-line-options.php#depth">-depth <var>value</var></a></td>
  159. <td>image depth</td>
  160. </tr>
  161. <tr>
  162. <td><a href="command-line-options.php#displace">-displace <var>geometry</var></a></td>
  163. <td>shift image pixels defined by a displacement map</td>
  164. </tr>
  165. <tr>
  166. <td><a href="command-line-options.php#dissolve">-dissolve <var>value</var></a></td>
  167. <td>dissolve the two images a given percent</td>
  168. </tr>
  169. <tr>
  170. <td><a href="command-line-options.php#dither">-dither <var>method</var></a></td>
  171. <td>apply error diffusion to image</td>
  172. </tr>
  173. <tr>
  174. <td><a href="command-line-options.php#encipher">-encipher <var>filename</var></a></td>
  175. <td>convert plain pixels to cipher pixels</td>
  176. </tr>
  177. <tr>
  178. <td><a href="command-line-options.php#encoding">-encoding <var>type</var></a></td>
  179. <td>text encoding type</td>
  180. </tr>
  181. <tr>
  182. <td><a href="command-line-options.php#endian">-endian <var>type</var></a></td>
  183. <td>endianness (MSB or LSB) of the image</td>
  184. </tr>
  185. <tr>
  186. <td><a href="command-line-options.php#extract">-extract <var>geometry</var></a></td>
  187. <td>extract area from image</td>
  188. </tr>
  189. <tr>
  190. <td><a href="command-line-options.php#filter">-filter <var>type</var></a></td>
  191. <td>use this filter when resizing an image</td>
  192. </tr>
  193. <tr>
  194. <td><a href="command-line-options.php#font">-font <var>name</var></a></td>
  195. <td>render text with this font</td>
  196. </tr>
  197. <tr>
  198. <td><a href="command-line-options.php#geometry">-geometry <var>geometry</var></a></td>
  199. <td>preferred size or location of the image</td>
  200. </tr>
  201. <tr>
  202. <td><a href="command-line-options.php#gravity">-gravity <var>type</var></a></td>
  203. <td>horizontal and vertical text placement</td>
  204. </tr>
  205. <tr>
  206. <td><a href="command-line-options.php#green-primary">-green-primary <var>point</var></a></td>
  207. <td>chromaticity green primary point</td>
  208. </tr>
  209. <tr>
  210. <td><a href="command-line-options.php#help">-help</a></td>
  211. <td>print program options</td>
  212. </tr>
  213. <tr>
  214. <td><a href="command-line-options.php#identify">-identify</a></td>
  215. <td>identify the format and characteristics of the image</td>
  216. </tr>
  217. <tr>
  218. <td><a href="command-line-options.php#interlace">-interlace <var>type</var></a></td>
  219. <td>type of image interlacing scheme</td>
  220. </tr>
  221. <tr>
  222. <td><a href="command-line-options.php#interpolate">-interpolate <var>method</var></a></td>
  223. <td>pixel color interpolation method</td>
  224. </tr>
  225. <tr>
  226. <td><a href="command-line-options.php#label">-label <var>string</var></a></td>
  227. <td>assign a label to an image</td>
  228. </tr>
  229. <tr>
  230. <td><a href="command-line-options.php#level">-level <var>value</var></a></td>
  231. <td>adjust the level of image contrast</td>
  232. </tr>
  233. <tr>
  234. <td><a href="command-line-options.php#limit">-limit <var>type value</var></a></td>
  235. <td>pixel cache resource limit</td>
  236. </tr>
  237. <tr>
  238. <td><a href="command-line-options.php#log">-log <var>format</var></a></td>
  239. <td>format of debugging information</td>
  240. </tr>
  241. <tr>
  242. <td><a href="command-line-options.php#monitor">-monitor</a></td>
  243. <td>monitor progress</td>
  244. </tr>
  245. <tr>
  246. <td><a href="command-line-options.php#monochrome">-monochrome</a></td>
  247. <td>transform image to black and white</td>
  248. </tr>
  249. <tr>
  250. <td><a href="command-line-options.php#negate">-negate</a></td>
  251. <td>replace each pixel with its complementary color </td>
  252. </tr>
  253. <tr>
  254. <td><a href="command-line-options.php#page">-page <var>geometry</var></a></td>
  255. <td>size and location of an image canvas (setting)</td>
  256. </tr>
  257. <tr>
  258. <td><a href="command-line-options.php#pointsize">-pointsize <var>value</var></a></td>
  259. <td>font point size</td>
  260. </tr>
  261. <tr>
  262. <td><a href="command-line-options.php#profile">-profile <var>filename</var></a></td>
  263. <td>add, delete, or apply an image profile</td>
  264. </tr>
  265. <tr>
  266. <td><a href="command-line-options.php#quality">-quality <var>value</var></a></td>
  267. <td>JPEG/MIFF/PNG compression level</td>
  268. </tr>
  269. <tr>
  270. <td><a href="command-line-options.php#quantize">-quantize <var>colorspace</var></a></td>
  271. <td>reduce image colors in this colorspace</td>
  272. </tr>
  273. <tr>
  274. <td><a href="command-line-options.php#quiet">-quiet</a></td>
  275. <td>suppress all warning messages</td>
  276. </tr>
  277. <tr>
  278. <td><a href="command-line-options.php#red-primary">-red-primary <var>point</var></a></td>
  279. <td>chromaticity red primary point</td>
  280. </tr>
  281. <tr>
  282. <td><a href="command-line-options.php#regard-warnings">-regard-warnings</a></td>
  283. <td>pay attention to warning messages.</td>
  284. </tr>
  285. <tr>
  286. <td><a href="command-line-options.php#respect-parentheses">-respect-parentheses</a></td>
  287. <td>settings remain in effect until parenthesis boundary.</td>
  288. </tr>
  289. <tr>
  290. <td><a href="command-line-options.php#rotate">-rotate <var>degrees</var></a></td>
  291. <td>apply Paeth rotation to the image</td>
  292. </tr>
  293. <tr>
  294. <td><a href="command-line-options.php#sampling-factor">-sampling-factor <var>geometry</var></a></td>
  295. <td>horizontal and vertical sampling factor</td>
  296. </tr>
  297. <tr>
  298. <td><a href="command-line-options.php#scene">-scene <var>value</var></a></td>
  299. <td>image scene number</td>
  300. </tr>
  301. <tr>
  302. <td><a href="command-line-options.php#seed">-seed <var>value</var></a></td>
  303. <td>seed a new sequence of pseudo-random numbers</td>
  304. </tr>
  305. <tr>
  306. <td><a href="command-line-options.php#set">-set <var>attribute value</var></a></td>
  307. <td>set an image attribute</td>
  308. </tr>
  309. <tr>
  310. <td><a href="command-line-options.php#sharpen">-sharpen <var>geometry</var></a></td>
  311. <td>sharpen the image</td>
  312. </tr>
  313. <tr>
  314. <td><a href="command-line-options.php#shave">-shave <var>geometry</var></a></td>
  315. <td>shave pixels from the image edges</td>
  316. </tr>
  317. <tr>
  318. <td><a href="command-line-options.php#size">-size <var>geometry</var></a></td>
  319. <td>width and height of image</td>
  320. </tr>
  321. <tr>
  322. <td><a href="command-line-options.php#stegano">-stegano <var>offset</var></a></td>
  323. <td>hide watermark within an image</td>
  324. </tr>
  325. <tr>
  326. <td><a href="command-line-options.php#stereo">-stereo <var>geometry</var></a></td>
  327. <td>combine two image to create a stereo anaglyph</td>
  328. </tr>
  329. <tr>
  330. <td><a href="command-line-options.php#strip">-strip</a></td>
  331. <td>strip image of all profiles and comments</td>
  332. </tr>
  333. <tr>
  334. <td><a href="command-line-options.php#swap">-swap <var>indexes</var></a></td>
  335. <td>swap two images in the image sequence</td>
  336. </tr>
  337. <tr>
  338. <td><a href="command-line-options.php#synchronize">-synchronize</a></td>
  339. <td>synchronize image to storage device</td>
  340. </tr>
  341. <tr>
  342. <td><a href="command-line-options.php#taint">-taint</a></td>
  343. <td>mark the image as modified</td>
  344. </tr>
  345. <tr>
  346. <td><a href="command-line-options.php#thumbnail">-thumbnail <var>geometry</var></a></td>
  347. <td>create a thumbnail of the image</td>
  348. </tr>
  349. <tr>
  350. <td><a href="command-line-options.php#tile">-tile</a></td>
  351. <td>repeat composite operation across and down image</td>
  352. </tr>
  353. <tr>
  354. <td><a href="command-line-options.php#transform">-transform</a></td>
  355. <td>affine transform image</td>
  356. </tr>
  357. <tr>
  358. <td><a href="command-line-options.php#transparent-color">-transparent-color <var>color</var></a></td>
  359. <td>transparent color</td>
  360. </tr>
  361. <tr>
  362. <td><a href="command-line-options.php#treedepth">-treedepth <var>value</var></a></td>
  363. <td>color tree depth</td>
  364. </tr>
  365. <tr>
  366. <td><a href="command-line-options.php#type">-type <var>type</var></a></td>
  367. <td>image type</td>
  368. </tr>
  369. <tr>
  370. <td><a href="command-line-options.php#units">-units <var>type</var></a></td>
  371. <td>the units of image resolution</td>
  372. </tr>
  373. <tr>
  374. <td><a href="command-line-options.php#unsharp">-unsharp <var>geometry</var></a></td>
  375. <td>sharpen the image</td>
  376. </tr>
  377. <tr>
  378. <td><a href="command-line-options.php#verbose">-verbose</a></td>
  379. <td>print detailed information about the image</td>
  380. </tr>
  381. <tr>
  382. <td><a href="command-line-options.php#version">-version</a></td>
  383. <td>print version information</td>
  384. </tr>
  385. <tr>
  386. <td><a href="command-line-options.php#virtual-pixel">-virtual-pixel <var>method</var></a></td>
  387. <td>access method for pixels outside the boundaries of the image</td>
  388. </tr>
  389. <tr>
  390. <td><a href="command-line-options.php#watermark">-watermark <var>geometry</var></a></td>
  391. <td>percent brightness and saturation of a watermark</td>
  392. </tr>
  393. <tr>
  394. <td><a href="command-line-options.php#white-point">-white-point <var>point</var></a></td>
  395. <td>chromaticity white point</td>
  396. </tr>
  397. <tr>
  398. <td><a href="command-line-options.php#white-threshold">-white-threshold <var>value</var></a></td>
  399. <td>force all pixels above the threshold into white</td>
  400. </tr>
  401. <tr>
  402. <td><a href="command-line-options.php#write">-write <var>filename</var></a></td>
  403. <td>write images to this file</td>
  404. </tr>
  405. </tbody>
  406. </table>
  407. </div>
  408. <footer class="magick-footer">
  409. <p><a href="support.php">Donate</a>
  410. <a href="sitemap.php">Sitemap</a>
  411. <a href="links.php">Related</a>
  412. <a href="architecture.php">Architecture</a>
  413. </p>
  414. <p><a href="composite.php#">Back to top</a>
  415. <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a>
  416. <a href="contact.php">Contact Us</a></p>
  417. <p><small>© 1999-2016 ImageMagick Studio LLC</small></p>
  418. </footer>
  419. </div><!-- /.container -->
  420. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
  421. <script src="http://nextgen.imagemagick.org/js/magick.php"></script>
  422. </div>
  423. </body>
  424. </html>