Image.html 137 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>Magick++ API: Working with Images</title>
  7. <link rel="stylesheet" href="magick.css" type="text/css" />
  8. </head>
  9. <body>
  10. <div class="doc-section">
  11. <center>
  12. <h1> Magick::Image Class</h1>
  13. </center>
  14. <h4> Quick Contents</h4>
  15. <ul>
  16. <li> <a href="Image.html#BLOBs">BLOBs</a> </li>
  17. <li> <a href="Image.html#Constructors">Constructors</a> </li>
  18. <li> <a href="Image.html#Image%20Manipulation%20Methods">Image Manipulation
  19. Methods</a> </li>
  20. <li> <a href="Image.html#Image%20Attributes">Image Attributes</a> </li>
  21. <li> <a href="Image.html#Raw%20Image%20Pixel%20Access">Low-Level Image Pixel
  22. Access</a> </li>
  23. </ul>
  24. <p>Image is the primary object in Magick++ and represents
  25. a single image frame (see <a href="https://imagemagick.org/Magick++/ImageDesign.html">design</a> ). The
  26. <a href="https://imagemagick.org/Magick++/STL.html">STL interface</a> <b>must</b> be used to operate on
  27. image sequences or images (e.g. of format GIF, TIFF, MIFF, Postscript,
  28. &amp; MNG) which are comprized of multiple image frames. Individual
  29. frames of a multi-frame image may be requested by adding array-style
  30. notation to the end of the file name (e.g. "animation.gif[3]" retrieves
  31. the fourth frame of a GIF animation.&#160; Various image manipulation
  32. operations may be applied to the image. Attributes may be set on the
  33. image to influence the operation of the manipulation operations. The <a
  34. href="https://imagemagick.org/Magick++/Pixels.html"> Pixels</a> class provides low-level access to
  35. image
  36. pixels. As a convenience, including <tt><font color="#663366">&lt;Magick++.h&gt;</font></tt>
  37. is sufficient in order to use the complete Magick++ API. The Magick++
  38. API is enclosed within the <i>Magick</i> namespace so you must either
  39. add the prefix "<tt> Magick::</tt> " to each class/enumeration name or
  40. add
  41. the statement "<tt> using namespace Magick;</tt>" after including the <tt>Magick++.h</tt>
  42. header.</p>
  43. <p>The preferred way to allocate Image objects is via automatic
  44. allocation (on the stack). There is no concern that allocating Image
  45. objects on the stack will excessively enlarge the stack since Magick++
  46. allocates all large data objects (such as the actual image data) from
  47. the heap. Use of automatic allocation is preferred over explicit
  48. allocation (via <i>new</i>) since it is much less error prone and
  49. allows use of C++ scoping rules to avoid memory leaks. Use of automatic
  50. allocation allows Magick++ objects to be assigned and copied just like
  51. the C++ intrinsic data types (e.g. '<i>int</i> '), leading to clear and
  52. easy to read code. Use of automatic allocation leads to naturally
  53. exception-safe code since if an exception is thrown, the object is
  54. automagically deallocated once the stack unwinds past the scope of the
  55. allocation (not the case for objects allocated via <i>new</i> ). </p>
  56. <p>Image is very easy to use. For example, here is a the source to a
  57. program which reads an image, crops it, and writes it to a new file
  58. (the
  59. exception handling is optional but strongly recommended): </p>
  60. <pre class="code">
  61. #include &lt;Magick++.h>
  62. #include &lt;iostream>
  63. using namespace std;
  64. using namespace Magick;
  65. int main(int argc,char **argv)
  66. {
  67. InitializeMagick(*argv);
  68. // Construct the image object. Seperating image construction from the
  69. // the read operation ensures that a failure to read the image file
  70. // doesn't render the image object useless.
  71. Image image;
  72. try {
  73. // Read a file into image object
  74. image.read( "girl.gif" );
  75. // Crop the image to specified size (width, height, xOffset, yOffset)
  76. image.crop( Geometry(100,100, 100, 100) );
  77. // Write the image to a file
  78. image.write( "x.gif" );
  79. }
  80. catch( Exception &amp;error_ )
  81. {
  82. cout &lt;&lt; "Caught exception: " &lt;&lt; error_.what() &lt;&lt; endl;
  83. return 1;
  84. }
  85. return 0;
  86. }
  87. </pre>
  88. The following is the source to a program which illustrates the use of
  89. Magick++'s efficient reference-counted assignment and copy-constructor
  90. operations which minimize use of memory and eliminate unncessary copy
  91. operations (allowing Image objects to be efficiently assigned, and
  92. copied into containers).&#160; The program accomplishes the
  93. following:
  94. <ol>
  95. <li> Read master image.</li>
  96. <li> Assign master image to second image.</li>
  97. <li> Resize second image to the size 640x480.</li>
  98. <li> Assign master image to a third image.</li>
  99. <li> Resize third image to the size 800x600.</li>
  100. <li> Write the second image to a file.</li>
  101. <li> Write the third image to a file.</li>
  102. </ol>
  103. <pre class="code">
  104. #include &lt;Magick++.h>
  105. #include &lt;iostream>
  106. using namespace std;
  107. using namespace Magick;
  108. int main(int argc,char **argv)
  109. {
  110. InitializeMagick(*argv);
  111. Image master("horse.jpg");
  112. Image second = master;
  113. second.resize("640x480");
  114. Image third = master;
  115. third.resize("800x600");
  116. second.write("horse640x480.jpg");
  117. third.write("horse800x600.jpg");
  118. return 0;
  119. }
  120. </pre>
  121. During the entire operation, a maximum of three images exist in memory
  122. and the image data is never copied.
  123. <p>The following is the source for another simple program which creates
  124. a 100 by 100 pixel white image with a red pixel in the center and
  125. writes it to a file: </p>
  126. <pre class="code">
  127. #include &lt;Magick++.h>
  128. using namespace std;
  129. using namespace Magick;
  130. int main(int argc,char **argv)
  131. {
  132. InitializeMagick(*argv);
  133. Image image( "100x100", "white" );
  134. image.pixelColor( 49, 49, "red" );
  135. image.write( "red_pixel.png" );
  136. return 0;
  137. }
  138. </pre>
  139. If you wanted to change the color image to grayscale, you could add the
  140. lines:
  141. <pre class="code">
  142. image.quantizeColorSpace( GRAYColorspace );
  143. image.quantizeColors( 256 );
  144. image.quantize( );
  145. </pre>
  146. <p>or, more simply: </p>
  147. <pre class="code">
  148. image.type( GrayscaleType );
  149. </pre>
  150. <p>prior to writing the image. </p>
  151. <center>
  152. <h3> <a name="BLOBs"></a> BLOBs</h3>
  153. </center>
  154. While encoded images (e.g. JPEG) are most often written-to and
  155. read-from a disk file, encoded images may also reside in memory.
  156. Encoded
  157. images in memory are known as BLOBs (Binary Large OBjects) and may be
  158. represented using the <a href="https://imagemagick.org/Magick++/Blob.html">Blob</a> class. The encoded
  159. image may be initially placed in memory by reading it directly from a
  160. file, reading the image from a database, memory-mapped from a disk
  161. file, or could be written to memory by Magick++. Once the encoded image
  162. has been placed within a Blob, it may be read into a Magick++ Image via
  163. a <a href="Image.html#constructor_blob">constructor</a> or <a href="Image.html#read">read()</a>
  164. . Likewise, a Magick++ image may be written to a Blob via <a
  165. href="Image.html#write"> write()</a> .
  166. <p>An example of using Image to write to a Blob follows: <br />
  167. &#160; </p>
  168. <pre class="code">
  169. #include &gt;Magick++.h>
  170. using namespace std;
  171. using namespace Magick;
  172. int main(int argc,char **argv)
  173. {
  174. InitializeMagick(*argv);
  175. // Read GIF file from disk
  176. Image image( "giraffe.gif" );
  177. // Write to BLOB in JPEG format
  178. Blob blob;
  179. image.magick( "JPEG" ) // Set JPEG output format
  180. image.write( &amp;blob );
  181. [ Use BLOB data (in JPEG format) here ]
  182. return 0;
  183. }
  184. </pre>
  185. <p><br />
  186. likewise, to read an image from a Blob, you could use one of the
  187. following examples: </p>
  188. <p>[ <font color="#000000">Entry condition for the following examples
  189. is that <i>data</i> is pointer to encoded image data and <i>length</i>
  190. represents the size of the data</font> ] </p>
  191. <pre class="code">
  192. Blob blob( data, length );
  193. Image image( blob );
  194. </pre>
  195. or
  196. <pre class="code">
  197. Blob blob( data, length );
  198. Image image;
  199. image.read( blob);
  200. </pre>
  201. some images do not contain their size or format so the size and format must be specified in advance:
  202. <pre class="code">
  203. Blob blob( data, length );
  204. Image image;
  205. image.size( "640x480")
  206. image.magick( "RGBA" );
  207. image.read( blob);
  208. </pre>
  209. <center>
  210. <h3> <a name="Constructors"></a> Constructors</h3>
  211. </center>
  212. Image may be constructed in a number of ways. It may be constructed
  213. from a file, a URL, or an encoded image (e.g. JPEG) contained in an
  214. in-memory <a href="https://imagemagick.org/Magick++/Blob.html"> BLOB</a> . The available Image
  215. constructors are shown in the following table: <br />
  216. &#160; <br />
  217. &#160;
  218. <table bgcolor="#ffffff" border="1" width="100%">
  219. <caption><b>Image Constructors</b></caption> <tbody>
  220. <tr>
  221. <td>
  222. <center><b>Signature</b></center>
  223. </td>
  224. <td>
  225. <center><b>Description</b></center>
  226. </td>
  227. </tr>
  228. <tr>
  229. <td><font size="-1">const std::string &amp;imageSpec_</font></td>
  230. <td><font size="-1">Construct Image by reading from file or URL
  231. specified by <i>imageSpec_</i>. Use array notation (e.g. filename[9])
  232. to select a specific scene from a multi-frame image.</font></td>
  233. </tr>
  234. <tr>
  235. <td><font size="-1">const Geometry &amp;size_, const <a
  236. href="https://imagemagick.org/Magick++/Color.html"> Color</a> &amp;color_</font></td>
  237. <td><font size="-1">Construct a blank image canvas of specified
  238. size and color</font></td>
  239. </tr>
  240. <tr>
  241. <td><a name="constructor_blob"></a> <font size="-1">const <a
  242. href="https://imagemagick.org/Magick++/Blob.html">Blob</a> &amp;blob_</font></td>
  243. <td rowspan="5"><font size="-1">Construct Image by reading from
  244. encoded image data contained in an in-memory <a href="https://imagemagick.org/Magick++/Blob.html">BLOB</a>
  245. . Depending on the constructor arguments, the Blob <a href="Image.html#size">size</a>
  246. , <a href="Image.html#depth">depth</a> , <a href="Image.html#magick">magick</a> (format)
  247. may
  248. also be specified. Some image formats require that size be specified.
  249. The default ImageMagick uses for depth depends on the compiled-in
  250. Quantum size (8 or 16).&#160; If ImageMagick's Quantum size does not
  251. match that of the image, the depth may need to be specified.
  252. ImageMagick can usually automagically detect the image's format.
  253. When a format can't be automagically detected, the format (<a
  254. href="Image.html#magick">magick</a> ) must be specified.</font></td>
  255. </tr>
  256. <tr>
  257. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Blob.html">Blob</a>
  258. &amp;blob_, const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a> &amp;size_</font></td>
  259. </tr>
  260. <tr>
  261. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Blob.html">Blob</a>
  262. &amp;blob_, const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a> &amp;size,
  263. size_t depth</font></td>
  264. </tr>
  265. <tr>
  266. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Blob.html">Blob</a>
  267. &amp;blob_, const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a> &amp;size,
  268. size_t depth_, const string &amp;magick_</font></td>
  269. </tr>
  270. <tr>
  271. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Blob.html">Blob</a>
  272. &amp;blob_, const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a> &amp;size,
  273. const
  274. string &amp;magick_</font></td>
  275. </tr>
  276. <tr>
  277. <td><font size="-1">const size_t width_,&#160;</font> <br />
  278. <font size="-1">const size_t height_,</font> <br />
  279. <font size="-1">std::string map_,</font> <br />
  280. <font size="-1">const <a href="https://imagemagick.org/Magick++/Enumerations.html#StorageType">
  281. StorageType</a> type_,</font> <br />
  282. <font size="-1">const void *pixels_</font></td>
  283. <td><font size="-1">Construct a new Image based on an array of
  284. image pixels. The pixel data must be in scanline order top-to-bottom.
  285. The data can be character, short int, integer, float, or double. Float
  286. and double require the pixels to be normalized [0..1]. The other types
  287. are [0..MaxRGB].&#160; For example, to create a 640x480 image from
  288. unsigned red-green-blue character data, use</font>
  289. <p><font size="-1">&#160;&#160; Image image( 640, 480, "RGB",
  290. 0, pixels );</font> </p>
  291. <p><font size="-1">The parameters are as follows:</font> <br />
  292. &#160;</p>
  293. <table border="0" width="100%">
  294. <tbody>
  295. <tr>
  296. <td><font size="-1">width_</font></td>
  297. <td><font size="-1">Width in pixels of the image.</font></td>
  298. </tr>
  299. <tr>
  300. <td><font size="-1">height_</font></td>
  301. <td><font size="-1">Height in pixels of the image.</font></td>
  302. </tr>
  303. <tr>
  304. <td><font size="-1">map_</font></td>
  305. <td><font size="-1">This character string can be any
  306. combination or order of R = red, G = green, B = blue, A = alpha, C =
  307. cyan, Y = yellow M = magenta, and K = black. The ordering reflects the
  308. order of the pixels in the supplied pixel array.</font></td>
  309. </tr>
  310. <tr>
  311. <td><font size="-1">type_</font></td>
  312. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Enumerations.html#StorageType">Pixel
  313. storage type</a> (CharPixel, ShortPixel, IntegerPixel, FloatPixel, or
  314. DoublePixel)</font></td>
  315. </tr>
  316. <tr>
  317. <td><font size="-1">pixels_</font></td>
  318. <td><font size="-1">This array of values contain the pixel
  319. components as defined by the map_ and type_ parameters. The length of
  320. the arrays must equal the area specified by the width_ and height_
  321. values and type_ parameters.</font></td>
  322. </tr>
  323. </tbody>
  324. </table>
  325. </td>
  326. </tr>
  327. </tbody>
  328. </table>
  329. <center>
  330. <h3> <a name="Image Manipulation Methods"></a> Image Manipulation
  331. Methods</h3>
  332. </center>
  333. <i>Image</i> supports access to all the single-image (versus
  334. image-list) manipulation operations provided by the ImageMagick
  335. library. If you
  336. must process a multi-image file (such as an animation), the <a
  337. href="https://imagemagick.org/Magick++/STL.html"> STL interface</a> , which provides a multi-image
  338. abstraction on top of <i>Image</i>, must be used.
  339. <p>Image manipulation methods are very easy to use.&#160; For example: </p>
  340. <pre class="code">
  341. Image image;
  342. image.read("myImage.tiff");
  343. image.addNoise(GaussianNoise);
  344. image.write("myImage.tiff");
  345. </pre>
  346. adds gaussian noise to the image file "myImage.tiff".
  347. <p>The operations supported by Image are shown in the following table: <br />
  348. &#160;</p>
  349. <table border="1">
  350. <caption><b>Image Image Manipulation Methods</b></caption> <tbody>
  351. <tr align="center">
  352. <td><b>Method</b></td>
  353. <td><b>Signature(s)</b></td>
  354. <td><b>Description</b></td>
  355. </tr>
  356. <tr>
  357. <td style="text-align: center;" valign="middle">
  358. <div style="text-align:center"><a name="adaptiveThreshold"></a> <font
  359. size="-1">adaptiveThreshold<br />
  360. </font></div>
  361. </td>
  362. <td valign="middle"><font size="-1">size_t width, size_t
  363. height, size_t offset = 0<br />
  364. </font></td>
  365. <td valign="top"><font size="-1">Apply adaptive thresholding to
  366. the image. Adaptive thresholding is useful if the ideal threshold level
  367. is not known in advance, or if the illumination gradient is not
  368. constant
  369. across the image. Adaptive thresholding works by evaulating the mean
  370. (average) of a pixel region (size specified by <i>width</i> and <i>height</i>)
  371. and using the mean as the thresholding value. In order to remove
  372. residual noise from the background, the threshold may be adjusted by
  373. subtracting a constant <i>offset</i> (default zero) from the mean to
  374. compute the threshold.</font><br />
  375. </td>
  376. </tr>
  377. <tr>
  378. <td style="text-align: center;">
  379. <center><a name="addNoise"></a> <font size="-1">addNoise</font></center>
  380. </td>
  381. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Enumerations.html#NoiseType">NoiseType</a>
  382. noiseType_</font></td>
  383. <td><font size="-1">Add noise to image with specified noise type.</font></td>
  384. </tr>
  385. <tr>
  386. <td style="vertical-align: middle; text-align: center;"><small><a
  387. name="addNoiseChannel"></a>addNoiseChannel<br />
  388. </small></td>
  389. <td style="vertical-align: middle;"><small>const ChannelType
  390. channel_, const NoiseType noiseType_<br />
  391. </small></td>
  392. <td style="vertical-align: middle;"><small>Add noise to an image
  393. channel with the specified noise type.</small><font size="-1"> The <span
  394. style="font-style: italic;">channel_</span> parameter specifies the
  395. channel to add noise to.&#160; The </font><small>noiseType_ parameter
  396. specifies the type of noise.<br />
  397. </small></td>
  398. </tr>
  399. <tr>
  400. <td style="vertical-align: middle; text-align: center;"><small><a
  401. name="affineTransform"></a>affineTransform<br />
  402. </small></td>
  403. <td style="vertical-align: middle;"><small>const DrawableAffine
  404. &amp;affine<br />
  405. </small></td>
  406. <td style="vertical-align: middle;"><small>Transform image by
  407. specified affine (or free transform) matrix.<br />
  408. </small></td>
  409. </tr>
  410. <tr>
  411. <td style="text-align: center;" rowspan="4">
  412. <center><a name="annotate"></a> <font size="-1">annotate</font></center>
  413. </td>
  414. <td><font size="-1">const std::string &amp;text_, const <a
  415. href="https://imagemagick.org/Magick++/Geometry.html"> Geometry</a> &amp;location_</font></td>
  416. <td><font size="-1">Annotate using specified text, and placement
  417. location</font></td>
  418. </tr>
  419. <tr>
  420. <td><font size="-1">string text_, const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a>
  421. &amp;boundingArea_, <a href="https://imagemagick.org/Magick++/Enumerations.html#GravityType">GravityType</a>
  422. gravity_</font></td>
  423. <td><font size="-1">Annotate using specified text, bounding area,
  424. and placement gravity. If <i>boundingArea_</i> is invalid, then
  425. bounding area is entire image.</font></td>
  426. </tr>
  427. <tr>
  428. <td><font size="-1">const std::string &amp;text_, const <a
  429. href="https://imagemagick.org/Magick++/Geometry.html"> Geometry</a> &amp;boundingArea_, <a
  430. href="https://imagemagick.org/Magick++/Enumerations.html#GravityType">GravityType</a> gravity_, double
  431. degrees_,&#160;</font></td>
  432. <td><font size="-1">Annotate with text using specified text,
  433. bounding area, placement gravity, and rotation. If <i>boundingArea_</i>
  434. is invalid, then bounding area is entire image.</font></td>
  435. </tr>
  436. <tr>
  437. <td><font size="-1">const std::string &amp;text_, <a
  438. href="https://imagemagick.org/Magick++/Enumerations.html#GravityType"> GravityType</a> gravity_</font></td>
  439. <td><font size="-1">Annotate with text (bounding area is entire
  440. image) and placement gravity.</font></td>
  441. </tr>
  442. <tr>
  443. <td style="text-align: center;">
  444. <center><a name="blur"></a> <font size="-1">blur</font></center>
  445. </td>
  446. <td><font size="-1">const double radius_ = 1, const double sigma_
  447. = 0.5</font></td>
  448. <td><font size="-1">Blur image. The <i>radius_ </i>parameter
  449. specifies the radius of the Gaussian, in pixels, not counting the
  450. center
  451. pixel.&#160; The <i>sigma_</i> parameter specifies the standard
  452. deviation of the Laplacian, in pixels.</font></td>
  453. </tr>
  454. <tr>
  455. <td style="vertical-align: middle; text-align: center;"><small><a
  456. name="blurChannel"></a>blurChannel<br />
  457. </small></td>
  458. <td style="vertical-align: middle;"><small>const ChannelType
  459. channel_, const double radius_ = 0.0, const double sigma_ = 1.0<br />
  460. </small></td>
  461. <td style="vertical-align: middle;"><font size="-1">Blur an image
  462. channel. The <span style="font-style: italic;">channel_</span>
  463. parameter specifies the channel to blur. The <i>radius_ </i>parameter
  464. specifies the radius of the Gaussian, in pixels, not counting the
  465. center
  466. pixel.&#160; The <i>sigma_</i> parameter specifies the standard
  467. deviation of the Laplacian, in pixels.</font></td>
  468. </tr>
  469. <tr>
  470. <td style="text-align: center;">
  471. <center><a name="border"></a> <font size="-1">border</font></center>
  472. </td>
  473. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a>
  474. &amp;geometry_ = "6x6+0+0"</font></td>
  475. <td><font size="-1">Border image (add border to image).&#160; The
  476. color of the border is specified by the <i>borderColor</i> attribute.</font></td>
  477. </tr>
  478. <tr>
  479. <td style="text-align: center;">
  480. <center><a name="cdl"></a> <font size="-1">cdl</font></center>
  481. </td>
  482. <td><font size="-1">const std::string &amp;cdl_</font></td>
  483. <td><font size="-1">color correct with a color decision list. See <a href="http://en.wikipedia.org/wiki/ASC_CDL">http://en.wikipedia.org/wiki/ASC_CDL</a> for details.</font></td>
  484. </tr>
  485. <tr>
  486. <td style="text-align: center;">
  487. <center><a name="channel"></a> <font size="-1">channel</font></center>
  488. </td>
  489. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Enumerations.html#ChannelType">ChannelType</a>
  490. layer_</font></td>
  491. <td><font size="-1">Extract channel from image. Use this option
  492. to extract a particular channel from&#160; the image.&#160; <i>MatteChannel</i>
  493. &#160; for&#160; example, is useful for extracting the opacity values
  494. from an image.</font></td>
  495. </tr>
  496. <tr>
  497. <td style="text-align: center;">
  498. <center><a name="charcoal"></a> <font size="-1">charcoal</font></center>
  499. </td>
  500. <td><font size="-1">const double radius_ = 1, const double sigma_
  501. = 0.5</font></td>
  502. <td><font size="-1">Charcoal effect image (looks like charcoal
  503. sketch). The <i>radius_</i> parameter specifies the radius of the
  504. Gaussian, in pixels, not counting the center pixel.&#160; The <i>sigma_</i>
  505. parameter specifies the standard deviation of the Laplacian, in pixels.</font></td>
  506. </tr>
  507. <tr>
  508. <td style="text-align: center;">
  509. <center><a name="chop"></a> <font size="-1">chop</font></center>
  510. </td>
  511. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a>
  512. &amp;geometry_</font></td>
  513. <td><font size="-1">Chop image (remove vertical or horizontal
  514. subregion of image)</font></td>
  515. </tr>
  516. <tr>
  517. <td style="text-align: center;">
  518. <center><a name="colorize"></a> <font size="-1">colorize</font></center>
  519. </td>
  520. <td><font size="-1">const unsigned int opacityRed_, const
  521. unsigned int opacityGreen_, const unsigned int opacityBlue_, const
  522. Color &amp;penColor_</font></td>
  523. <td><font size="-1">Colorize image with pen color, using
  524. specified percent opacity for red, green, and blue quantums.</font></td>
  525. </tr>
  526. <tr>
  527. <td style="text-align: center;">
  528. <center><a name="colorMatrix"></a> <font size="-1">colorMatrix</font></center>
  529. </td>
  530. <td><font size="-1">const size_t order_, const double *color_matrix_</font></td>
  531. <td><font size="-1">apply color correction to the image.</font></td>
  532. </tr>
  533. <tr>
  534. <td style="text-align: center;">
  535. <center><a name="comment"></a> <font size="-1">comment</font></center>
  536. </td>
  537. <td><font size="-1">const std::string &amp;comment_</font></td>
  538. <td><font size="-1">Comment image (add comment string to
  539. image).&#160; By default, each image is commented with its file name.
  540. Use&#160; this&#160; method to&#160; assign a specific comment to the
  541. image.&#160; Optionally you can include the image filename, type,
  542. width, height, or other&#160; image&#160; attributes by embedding <a
  543. href="https://imagemagick.org/Magick++/FormatCharacters.html">special format characters.</a> </font></td>
  544. </tr>
  545. <tr>
  546. <td style="text-align: center;" valign="middle"><font size="-1"><a
  547. name="compare"></a> compare<br />
  548. </font></td>
  549. <td valign="middle"><font size="-1">const Image &amp;reference_<br />
  550. </font></td>
  551. <td valign="top"><font size="-1">Compare current image with
  552. another image. Sets <a href="Image.html#meanErrorPerPixel">meanErrorPerPixel</a>
  553. , <a href="Image.html#normalizedMaxError">normalizedMaxError</a> , and <a
  554. href="Image.html#normalizedMeanError">normalizedMeanError</a> in the current
  555. image. False is returned if the images are identical. An ErrorOption
  556. exception is thrown if the reference image columns, rows, colorspace,
  557. or
  558. matte differ from the current image.</font><br />
  559. </td>
  560. </tr>
  561. <tr>
  562. <td style="text-align: center;" rowspan="3">
  563. <center><a name="composite"></a> <font size="-1">composite</font></center>
  564. </td>
  565. <td><font size="-1">const <a href="Image.html">Image</a>
  566. &amp;compositeImage_, ssize_t xOffset_, ssize_t yOffset_, <a
  567. href="https://imagemagick.org/Magick++/Enumerations.html#CompositeOperator"> CompositeOperator</a>
  568. compose_ = <i>InCompositeOp</i></font></td>
  569. <td><font size="-1">Compose an image onto the current image at
  570. offset specified by <i>xOffset_</i>, <i>yOffset_ </i>using the
  571. composition algorithm specified by <i>compose_</i>.&#160;</font></td>
  572. </tr>
  573. <tr>
  574. <td><font size="-1">const <a href="Image.html">Image</a>
  575. &amp;compositeImage_, const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a>
  576. &amp;offset_, <a href="https://imagemagick.org/Magick++/Enumerations.html#CompositeOperator">CompositeOperator</a>
  577. compose_ = <i>InCompositeOp</i></font></td>
  578. <td><font size="-1">Compose an image onto the current image at
  579. offset specified by <i>offset_</i> using the composition algorithm
  580. specified by <i>compose_</i> .&#160;</font></td>
  581. </tr>
  582. <tr>
  583. <td><font size="-1">const <a href="Image.html">Image</a>
  584. &amp;compositeImage_, <a href="https://imagemagick.org/Magick++/Enumerations.html#GravityType">GravityType</a>
  585. gravity_, <a href="https://imagemagick.org/Magick++/Enumerations.html#CompositeOperator">CompositeOperator</a>
  586. compose_ = <i>InCompositeOp</i></font></td>
  587. <td><font size="-1">Compose an image onto the current image with
  588. placement specified by <i>gravity_ </i>using the composition
  589. algorithm
  590. specified by <i>compose_</i>.&#160;</font></td>
  591. </tr>
  592. <tr>
  593. <td style="text-align: center;">
  594. <center><a name="contrast"></a> <font size="-1">contrast</font></center>
  595. </td>
  596. <td><font size="-1">size_t sharpen_</font></td>
  597. <td><font size="-1">Contrast image (enhance intensity differences
  598. in image)</font></td>
  599. </tr>
  600. <tr>
  601. <td style="text-align: center;">
  602. <center><a name="convolve"></a> <font size="-1">convolve</font></center>
  603. </td>
  604. <td><font size="-1">size_t order_, const double *kernel_</font></td>
  605. <td><font size="-1">Convolve image.&#160; Applies a user-specfied
  606. convolution to the image. The <i>order_</i> parameter represents the
  607. number of columns and rows in the filter kernel, and <i>kernel_</i>
  608. is a two-dimensional array of doubles representing the convolution
  609. kernel to apply.</font></td>
  610. </tr>
  611. <tr>
  612. <td style="text-align: center;">
  613. <center><a name="crop"></a> <font size="-1">crop</font></center>
  614. </td>
  615. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a>
  616. &amp;geometry_</font></td>
  617. <td><font size="-1">Crop image (subregion of original image)</font></td>
  618. </tr>
  619. <tr>
  620. <td style="text-align: center;">
  621. <center><a name="cycleColormap"></a> <font size="-1">cycleColormap</font></center>
  622. </td>
  623. <td><font size="-1">int amount_</font></td>
  624. <td><font size="-1">Cycle image colormap</font></td>
  625. </tr>
  626. <tr>
  627. <td style="text-align: center;">
  628. <center><a name="despeckle"></a> <font size="-1">despeckle</font></center>
  629. </td>
  630. <td><font size="-1">void</font></td>
  631. <td><font size="-1">Despeckle image (reduce speckle noise)</font></td>
  632. </tr>
  633. <tr>
  634. <td style="text-align: center;">
  635. <center><a name="display"></a> <font size="-1">display</font></center>
  636. </td>
  637. <td><font size="-1">void</font></td>
  638. <td><font size="-1">Display image on screen.</font> <br />
  639. <font size="-1"><b><font color="#ff0000">Caution: </font></b> if
  640. an image format is is not compatible with the display visual (e.g.
  641. JPEG on a colormapped display) then the original image will be
  642. altered. Use a copy of the original if this is a problem.</font></td>
  643. </tr>
  644. <tr>
  645. <td>
  646. <center><a name="distort"></a> <font size="-1">distort</font></center>
  647. </td>
  648. <td><font size="-1">const DistortImageMethod method, const size_t number_arguments, const double *arguments, const bool bestfit = false </font></td>
  649. <td><font size="-1">Distort image.&#160; Applies a user-specfied
  650. distortion to the image.</font></td>
  651. </tr>
  652. <tr>
  653. <td style="text-align: center;" rowspan="2">
  654. <center><a name="draw"></a> <font size="-1">draw</font></center>
  655. </td>
  656. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Drawable.html">Drawable</a>
  657. &amp;drawable_</font></td>
  658. <td><font size="-1">Draw shape or text on image.</font></td>
  659. </tr>
  660. <tr>
  661. <td><font size="-1">const std::list&lt;<a href="https://imagemagick.org/Magick++/Drawable.html">Drawable</a>
  662. &gt; &amp;drawable_</font></td>
  663. <td><font size="-1">Draw shapes or text on image using a set of
  664. Drawable objects contained in an STL list. Use of this method improves
  665. drawing performance and allows batching draw objects together in a
  666. list for repeated use.</font></td>
  667. </tr>
  668. <tr>
  669. <td style="text-align: center;">
  670. <center><a name="edge"></a> <font size="-1">edge</font></center>
  671. </td>
  672. <td><font size="-1">size_t radius_ = 0.0</font></td>
  673. <td><font size="-1">Edge image (hilight edges in image).&#160;
  674. The radius is the radius of the pixel neighborhood.. Specify a radius
  675. of zero for automatic radius selection.</font></td>
  676. </tr>
  677. <tr>
  678. <td style="text-align: center;">
  679. <center><a name="emboss"></a> <font size="-1">emboss</font></center>
  680. </td>
  681. <td><font size="-1">const double radius_ = 1, const double sigma_
  682. = 0.5</font></td>
  683. <td><font size="-1">Emboss image (hilight edges with 3D effect).
  684. The <i> radius_</i> parameter specifies the radius of the Gaussian, in
  685. pixels, not counting the center pixel.&#160; The <i>sigma_</i>
  686. parameter specifies the standard deviation of the Laplacian, in pixels.</font></td>
  687. </tr>
  688. <tr>
  689. <td style="text-align: center;">
  690. <center><a name="enhance"></a> <font size="-1">enhance</font></center>
  691. </td>
  692. <td><font size="-1">void</font></td>
  693. <td><font size="-1">Enhance image (minimize noise)</font></td>
  694. </tr>
  695. <tr>
  696. <td style="text-align: center;">
  697. <center><a name="equalize"></a> <font size="-1">equalize</font></center>
  698. </td>
  699. <td><font size="-1">void</font></td>
  700. <td><font size="-1">Equalize image (histogram equalization)</font></td>
  701. </tr>
  702. <tr>
  703. <td style="text-align: center;">
  704. <center><a name="erase"></a> <font size="-1">erase</font></center>
  705. </td>
  706. <td><font size="-1">void</font></td>
  707. <td><font size="-1">Set all image pixels to the current
  708. background color.</font></td>
  709. </tr>
  710. <tr>
  711. <td style="text-align: center;" rowspan="4">
  712. <center><a name="extent"></a> <font size="-1">extent</font></center></td>
  713. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Geometry.html"> Geometry</a> &amp;geometry_</font></td>
  714. <td rowspan="2"><font size="-1">extends the image as defined by the geometry, gravity, and image background color.</font></td>
  715. </tr>
  716. <tr>
  717. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a>
  718. &amp;geometry_, const <a href="https://imagemagick.org/Magick++/Color.html">Color</a> &amp;backgroundColor_</font></td>
  719. </tr>
  720. <tr>
  721. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Geometry.html"> Geometry</a> &amp;geometry_, const <a href="https://imagemagick.org/Magick++/Enumerations.html#GravityType">GravityType</a>
  722. &amp;gravity_</font></td>
  723. <td rowspan="2"><font size="-1">extends the image as defined by the geometry, gravity, and image background color.</font></td>
  724. </tr>
  725. <tr>
  726. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a>
  727. &amp;geometry_, const <a href="https://imagemagick.org/Magick++/Color.html">Color</a> &amp;backgroundColor_,
  728. const <a href="https://imagemagick.org/Magick++/Enumerations.html#GravityType">GravityType</a> &amp;gravity_</font></td>
  729. </tr>
  730. <tr>
  731. <td style="text-align: center;">
  732. <center><a name="flip"></a> <font size="-1">flip</font></center>
  733. </td>
  734. <td><font size="-1">void</font></td>
  735. <td><font size="-1">Flip image (reflect each scanline in the
  736. vertical direction)</font></td>
  737. </tr>
  738. <tr>
  739. <td style="text-align: center;" rowspan="4">
  740. <center><a name="floodFillColor"></a> <font size="-1">floodFill-</font>
  741. <br />
  742. <font size="-1">Color</font></center>
  743. </td>
  744. <td><font size="-1">ssize_t x_, ssize_t y_, const <a
  745. href="https://imagemagick.org/Magick++/Color.html"> Color</a> &amp;fillColor_</font></td>
  746. <td rowspan="2"><font size="-1">Flood-fill color across pixels
  747. that match the color of the target pixel and are neighbors of the
  748. target pixel. Uses current fuzz setting when determining color match.</font></td>
  749. </tr>
  750. <tr>
  751. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a>
  752. &amp;point_, const <a href="https://imagemagick.org/Magick++/Color.html">Color</a> &amp;fillColor_</font></td>
  753. </tr>
  754. <tr>
  755. <td><font size="-1">ssize_t x_, ssize_t y_, const <a
  756. href="https://imagemagick.org/Magick++/Color.html"> Color</a> &amp;fillColor_, const <a
  757. href="https://imagemagick.org/Magick++/Color.html">Color</a>
  758. &amp;borderColor_</font></td>
  759. <td rowspan="2"><font size="-1">Flood-fill color across pixels
  760. starting at target-pixel and stopping at pixels matching specified
  761. border color. Uses current fuzz setting when determining color match.</font></td>
  762. </tr>
  763. <tr>
  764. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a>
  765. &amp;point_, const <a href="https://imagemagick.org/Magick++/Color.html">Color</a> &amp;fillColor_,
  766. const <a href="https://imagemagick.org/Magick++/Color.html">Color</a> &amp;borderColor_</font></td>
  767. </tr>
  768. <tr>
  769. <td style="text-align: center;"><a name="floodFillOpacity"></a> <font
  770. size="-1">floodFillOpacity</font></td>
  771. <td><font size="-1">const long x_, const long y_, const unsigned int
  772. opacity_, const PaintMethod method_</font></td>
  773. <td><font size="-1">Floodfill pixels matching color (within fuzz
  774. factor) of target pixel(x,y) with replacement opacity value using
  775. method.</font></td>
  776. </tr>
  777. <tr>
  778. <td style="text-align: center;" rowspan="4">
  779. <center><a name="floodFillTexture"></a> <font size="-1">floodFill-</font>
  780. <br />
  781. <font size="-1">Texture</font></center>
  782. </td>
  783. <td><font size="-1">ssize_t x_, ssize_t y_,&#160; const
  784. Image &amp;texture_</font></td>
  785. <td rowspan="2"><font size="-1">Flood-fill texture across pixels
  786. that match the color of the target pixel and are neighbors of the
  787. target pixel. Uses current fuzz setting when determining color match.</font></td>
  788. </tr>
  789. <tr>
  790. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a>
  791. &amp;point_, const Image &amp;texture_</font></td>
  792. </tr>
  793. <tr>
  794. <td><font size="-1">ssize_t x_, ssize_t y_, const Image
  795. &amp;texture_, const <a href="https://imagemagick.org/Magick++/Color.html">Color</a> &amp;borderColor_</font></td>
  796. <td rowspan="2"><font size="-1">Flood-fill texture across pixels
  797. starting at target-pixel and stopping at pixels matching specified
  798. border color. Uses current fuzz setting when determining color match.</font></td>
  799. </tr>
  800. <tr>
  801. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a>
  802. &amp;point_, const Image &amp;texture_, const <a href="https://imagemagick.org/Magick++/Color.html">
  803. Color</a>
  804. &amp;borderColor_</font></td>
  805. </tr>
  806. <tr>
  807. <td style="text-align: center;">
  808. <center><a name="flop"></a> <font size="-1">flop</font></center>
  809. </td>
  810. <td><font size="-1">void&#160;</font></td>
  811. <td><font size="-1">Flop image (reflect each scanline in the
  812. horizontal direction)</font></td>
  813. </tr>
  814. <tr>
  815. <td style="text-align: center;" rowspan="2">
  816. <center><a name="frame"></a> <font size="-1">frame</font></center>
  817. </td>
  818. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a>
  819. &amp;geometry_ = "25x25+6+6"</font></td>
  820. <td rowspan="2"><font size="-1">Add decorative frame around image</font></td>
  821. </tr>
  822. <tr>
  823. <td><font size="-1">size_t width_, size_t height_,
  824. ssize_t x_, ssize_t y_, ssize_t innerBevel_ = 0, ssize_t outerBevel_ = 0</font></td>
  825. </tr>
  826. <tr>
  827. <td>
  828. <center><a name="fx"></a> <font size="-1">fx</font></center>
  829. </td>
  830. <td><font size="-1">const std::string expression, const Magick::ChannelType channel</font></td>
  831. <td><font size="-1">Fx image.&#160; Applies a mathematical
  832. expression to the image.</font></td>
  833. </tr>
  834. <tr>
  835. <td style="text-align: center;" rowspan="2">
  836. <center><a name="gamma"></a> <font size="-1">gamma</font></center>
  837. </td>
  838. <td><font size="-1">double gamma_</font></td>
  839. <td><font size="-1">Gamma correct image (uniform red, green, and
  840. blue correction).</font></td>
  841. </tr>
  842. <tr>
  843. <td><font size="-1">double gammaRed_, double gammaGreen_, double
  844. gammaBlue_</font></td>
  845. <td><font size="-1">Gamma correct red, green, and blue channels
  846. of image.</font></td>
  847. </tr>
  848. <tr>
  849. <td style="text-align: center;">
  850. <center><a name="gaussianBlur"></a> <font size="-1">gaussianBlur</font></center>
  851. </td>
  852. <td><font size="-1">const double width_, const double sigma_</font></td>
  853. <td><font size="-1">Gaussian blur image. The number of neighbor
  854. pixels to be included in the convolution mask is specified by
  855. 'width_'.&#160; For example, a width of one gives a (standard) 3x3
  856. convolution mask. The standard deviation of the gaussian bell curve is
  857. specified by 'sigma_'.</font></td>
  858. </tr>
  859. <tr>
  860. <td style="vertical-align: middle; text-align: center;"><small><a
  861. name="gaussianBlurChannel"></a>gaussianBlurChannel<br />
  862. </small></td>
  863. <td style="vertical-align: middle;"><small>const ChannelType
  864. channel_, const double radius_ = 0.0, const double sigma_ = 1.0<br />
  865. </small></td>
  866. <td style="vertical-align: middle;"><font size="-1">Gaussian blur
  867. an image channel. </font><font size="-1">The <span
  868. style="font-style: italic;">channel_</span> parameter specifies the
  869. channel to blur. </font><font size="-1">The number of neighbor
  870. pixels to be included in the convolution mask is specified by
  871. 'width_'.&#160; For example, a width of one gives a (standard) 3x3
  872. convolution mask. The standard deviation of the gaussian bell curve is
  873. specified by 'sigma_'.</font></td>
  874. </tr>
  875. <tr>
  876. <td style="text-align: center;" valign="middle"><font size="-1"><a
  877. name="haldClut"></a> haldClut<br />
  878. </font></td>
  879. <td valign="middle"><font size="-1">const Image &amp;reference_<br />
  880. </font></td>
  881. <td valign="top"><font size="-1">apply a Hald color lookup table to the image.</font><br />
  882. </td>
  883. </tr>
  884. <tr>
  885. <td style="text-align: center;">
  886. <center><a name="implode"></a> <font size="-1">implode</font></center>
  887. </td>
  888. <td><font size="-1">const double factor_</font></td>
  889. <td><font size="-1">Implode image (special effect)</font></td>
  890. </tr>
  891. <tr>
  892. <td style="text-align: center;">
  893. <center><a name="inverseFourierTransform"></a> <font size="-1">inverseFourierTransform</font></center>
  894. </td>
  895. <td><font size="-1">const Image &amp;phaseImage_, const bool magnitude_</font></td>
  896. <td><font size="-1">implements the inverse discrete Fourier transform (DFT) of the image either as a magnitude / phase or real / imaginary image pair.</font></td>
  897. </tr>
  898. <tr>
  899. <td style="text-align: center;">
  900. <center><a name="label"></a> <font size="-1">label</font></center>
  901. </td>
  902. <td><font size="-1">const string &amp;label_</font></td>
  903. <td><font size="-1">Assign a label to an image. Use this option
  904. to&#160; assign&#160; a&#160; specific label to the image. Optionally
  905. you can include the image filename, type, width, height, or scene
  906. number in the label by embedding&#160; <a href="https://imagemagick.org/Magick++/FormatCharacters.html">
  907. special format characters.</a> If the first character of string is @,
  908. the
  909. image label is read from a file titled by the remaining characters in
  910. the string. When converting to Postscript, use this&#160; option to
  911. specify a header string to print above the image.</font></td>
  912. </tr>
  913. <tr>
  914. <td style="vertical-align: top; text-align: center;"><small><a
  915. name="level"></a>level<br />
  916. </small></td>
  917. <td style="vertical-align: top;"><small>const double black_point,
  918. const double white_point, const double mid_point=1.0<br />
  919. </small></td>
  920. <td style="vertical-align: top;"><small>Level image. Adjust the
  921. levels of the image by scaling the colors falling between specified
  922. white and black points to the full available quantum range. The
  923. parameters provided represent the black, mid (gamma), and white
  924. points.&#160; The black point specifies the darkest color in the image.
  925. Colors darker than the black point are set to zero. Mid point (gamma)
  926. specifies a gamma correction to apply to the image. White point
  927. specifies the lightest color in the image.&#160; Colors brighter than
  928. the white point are set to the maximum quantum value. The black and
  929. white point have the valid range 0 to MaxRGB while mid (gamma) has a
  930. useful range of 0 to ten.<br />
  931. </small></td>
  932. </tr>
  933. <tr>
  934. <td style="vertical-align: middle; text-align: center;"><small><a
  935. name="levelChannel"></a>levelChannel<br />
  936. </small></td>
  937. <td style="vertical-align: middle;"><small>const ChannelType
  938. channel, const double black_point, const double white_point, const
  939. double mid_point=1.0<br />
  940. </small></td>
  941. <td style="vertical-align: middle;"><small>Level image channel.
  942. Adjust the levels of the image channel by scaling the values falling
  943. between specified white and black points to the full available quantum
  944. range. The parameters provided represent the black, mid (gamma), and
  945. white points. The black point specifies the darkest color in the image.
  946. Colors darker than the black point are set to zero. Mid point (gamma)
  947. specifies a gamma correction to apply to the image. White point
  948. specifies the lightest color in the image. Colors brighter than the
  949. white point are set to the maximum quantum value. The black and white
  950. point have the valid range 0 to MaxRGB while mid (gamma) has a useful
  951. range of 0 to ten.<br />
  952. </small></td>
  953. </tr>
  954. <tr>
  955. <td style="text-align: center;">
  956. <center><a name="magnify"></a> <font size="-1">magnify</font></center>
  957. </td>
  958. <td><font size="-1">void</font></td>
  959. <td><font size="-1">Magnify image by integral size</font></td>
  960. </tr>
  961. <tr>
  962. <td style="text-align: center;">
  963. <center><a name="map"></a> <font size="-1">map</font></center>
  964. </td>
  965. <td><font size="-1">const Image &amp;mapImage_ , bool dither_ =
  966. false</font></td>
  967. <td><font size="-1">Remap image colors with closest color from
  968. reference image. Set dither_ to <i>true</i> in to apply
  969. Floyd/Steinberg
  970. error diffusion to the image. By default, color reduction chooses an
  971. optimal&#160; set&#160; of colors that best represent the original
  972. image. Alternatively, you can&#160; choose&#160; a&#160;
  973. particular&#160; set&#160; of colors&#160; from&#160; an image file
  974. with this option.</font></td>
  975. </tr>
  976. <tr>
  977. <td style="text-align: center;">
  978. <center><a name="matteFloodfill"></a> <font size="-1">matteFloodfill</font></center>
  979. </td>
  980. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Color.html">Color</a>
  981. &amp;target_, const unsigned int&#160; opacity_, const ssize_t x_, const
  982. ssize_t
  983. y_, <a href="https://imagemagick.org/Magick++/Enumerations.html#PaintMethod">PaintMethod</a> method_</font></td>
  984. <td><font size="-1">Floodfill designated area with a replacement
  985. opacity value.</font></td>
  986. </tr>
  987. <tr>
  988. <td style="text-align: center;"><a name="medianFilter"></a> <font
  989. size="-1">medianFilter</font></td>
  990. <td><font size="-1">const double radius_ = 0.0</font></td>
  991. <td><font size="-1">Filter image by replacing each pixel
  992. component with the median color in a circular neighborhood</font></td>
  993. </tr>
  994. <tr>
  995. <td style="text-align: center;">
  996. <center><a name="mergeLayers"></a> <font size="-1">mergeLayers</font></center>
  997. </td>
  998. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Enumerations.html#LayerMethod">LayerMethod</a>
  999. noiseType_</font></td>
  1000. <td><font size="-1">handle multiple images forming a set of image layers or animation frames.</font></td>
  1001. </tr>
  1002. <tr>
  1003. <td style="text-align: center;">
  1004. <center><a name="minify"></a> <font size="-1">minify</font></center>
  1005. </td>
  1006. <td><font size="-1">void</font></td>
  1007. <td><font size="-1">Reduce image by integral size</font></td>
  1008. </tr>
  1009. <tr>
  1010. <td style="text-align: center;"><a name="modifyImage"></a> <font
  1011. size="-1">modifyImage</font></td>
  1012. <td><font size="-1">void</font></td>
  1013. <td><font size="-1">Prepare to update image. Ensures that there
  1014. is only one reference to the underlying image so that the underlying
  1015. image may be safely modified without effecting previous generations of
  1016. the image. Copies the underlying image to a new image if necessary.</font></td>
  1017. </tr>
  1018. <tr>
  1019. <td style="text-align: center;">
  1020. <center><a name="modulate"></a> <font size="-1">modulate</font></center>
  1021. </td>
  1022. <td><font size="-1">double brightness_, double saturation_,
  1023. double hue_</font></td>
  1024. <td><font size="-1">Modulate percent hue, saturation, and
  1025. brightness of an image. Modulation of saturation and brightness is as a
  1026. ratio of the current value (1.0 for no change). Modulation of hue is an
  1027. absolute rotation of -180 degrees to +180 degrees from the current
  1028. position corresponding to an argument range of 0 to 2.0 (1.0 for no
  1029. change).</font></td>
  1030. </tr>
  1031. <tr>
  1032. <td style="vertical-align: middle; text-align: center;"><small><a
  1033. name="motionBlur"></a>motionBlur<br />
  1034. </small></td>
  1035. <td style="vertical-align: middle;"><small>const double radius_,
  1036. const double sigma_, const double angle_<br />
  1037. </small></td>
  1038. <td style="vertical-align: middle;"><small>Motion blur image with
  1039. specified blur factor. The radius_ parameter specifies the radius of
  1040. the Gaussian, in pixels, not counting the center pixel.&#160; The
  1041. sigma_ parameter specifies the standard deviation of the Laplacian, in
  1042. pixels. The angle_ parameter specifies the angle the object appears to
  1043. be comming from (zero degrees is from the right).<br />
  1044. </small></td>
  1045. </tr>
  1046. <tr>
  1047. <td style="text-align: center;">
  1048. <center><a name="negate"></a> <font size="-1">negate</font></center>
  1049. </td>
  1050. <td><font size="-1">bool grayscale_ = false</font></td>
  1051. <td><font size="-1">Negate colors in image.&#160; Replace every
  1052. pixel with its complementary color (white becomes black, yellow becomes
  1053. blue, etc.).&#160; Set grayscale to only negate grayscale values in
  1054. image.</font></td>
  1055. </tr>
  1056. <tr>
  1057. <td style="text-align: center;">
  1058. <center><a name="normalize"></a> <font size="-1">normalize</font></center>
  1059. </td>
  1060. <td><font size="-1">void</font></td>
  1061. <td><font size="-1">Normalize image (increase contrast by
  1062. normalizing the pixel values to span the full range of color values).</font></td>
  1063. </tr>
  1064. <tr>
  1065. <td style="text-align: center;">
  1066. <center><a name="oilPaint"></a> <font size="-1">oilPaint</font></center>
  1067. </td>
  1068. <td><font size="-1">size_t radius_ = 3</font></td>
  1069. <td><font size="-1">Oilpaint image (image looks like oil painting)</font></td>
  1070. </tr>
  1071. <tr>
  1072. <td style="text-align: center;">
  1073. <center><a name="opacity"></a> <font size="-1">opacity</font></center>
  1074. </td>
  1075. <td><font size="-1">unsigned int opacity_</font></td>
  1076. <td><font size="-1">Set or attenuate the opacity channel in the
  1077. image. If the image pixels are opaque then they are set to the
  1078. specified
  1079. opacity value, otherwise they are blended with the supplied opacity
  1080. value.&#160; The value of opacity_ ranges from 0 (completely opaque) to
  1081. <i>MaxRGB</i>
  1082. . The defines <i>OpaqueOpacity</i> and <i>TransparentOpacity</i> are
  1083. available to specify completely opaque or completely transparent,
  1084. respectively.</font></td>
  1085. </tr>
  1086. <tr>
  1087. <td style="text-align: center;">
  1088. <center><a name="opaque"></a> <font size="-1">opaque</font></center>
  1089. </td>
  1090. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Color.html">Color</a>
  1091. &amp;opaqueColor_, const <a href="https://imagemagick.org/Magick++/Color.html">Color</a> &amp;penColor_</font></td>
  1092. <td><font size="-1">Change color of pixels matching opaqueColor_
  1093. to specified penColor_.</font></td>
  1094. </tr>
  1095. <tr>
  1096. <td style="text-align: center;" rowspan="2">
  1097. <center><a name="ping"></a> <font size="-1">ping</font></center>
  1098. </td>
  1099. <td><font size="-1">const std::string &amp;imageSpec_</font></td>
  1100. <td rowspan="2"><font size="-1">Ping is similar to read
  1101. except only enough of the image is read to determine the image columns,
  1102. rows, and filesize.&#160; The <a href="Image.html#columns">columns</a> </font>,
  1103. <font size="-1"><a href="Image.html#rows">rows</a> , and <a
  1104. href="Image.html#fileSize">fileSize</a>
  1105. attributes are valid after invoking ping.&#160; The image data is not
  1106. valid after calling ping.</font></td>
  1107. </tr>
  1108. <tr>
  1109. <td><font size="-1">const Blob &amp;blob_</font></td>
  1110. </tr>
  1111. <tr>
  1112. <td style="vertical-align: middle; text-align: center;"><small><a
  1113. name="process"></a>process<br />
  1114. </small></td>
  1115. <td style="vertical-align: middle;"><small>std::string name_,
  1116. const ssize_t argc_, char **argv_<br />
  1117. </small></td>
  1118. <td style="vertical-align: middle;"><small>Execute the named
  1119. process module, passing any arguments via an argument vector, with
  1120. argc_
  1121. specifying the number of arguments in the vector, and argv_ passing the
  1122. address of an array of null-terminated C strings which constitute the
  1123. argument vector. An exception is thrown if the requested process module
  1124. does not exist, fails to load, or fails during execution.</small><br />
  1125. </td>
  1126. </tr>
  1127. <tr>
  1128. <td style="text-align: center;">
  1129. <center><a name="quantize"></a> <font size="-1">quantize</font></center>
  1130. </td>
  1131. <td><font size="-1">bool measureError_ = false</font></td>
  1132. <td><font size="-1">Quantize image (reduce number of colors). Set
  1133. measureError_ to true in order to calculate error attributes.</font></td>
  1134. </tr>
  1135. <tr>
  1136. <td style="text-align: center;">
  1137. <center><a name="raise"></a> <font size="-1">raise</font></center>
  1138. </td>
  1139. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a>
  1140. &amp;geometry_ = "6x6+0+0",&#160; bool raisedFlag_ =&#160; false</font></td>
  1141. <td><font size="-1">Raise image (lighten or darken the edges of
  1142. an image to give a 3-D raised or lowered effect)</font></td>
  1143. </tr>
  1144. <tr>
  1145. <td style="text-align: center;" rowspan="8">
  1146. <center><a name="read"></a> <font size="-1">read</font></center>
  1147. </td>
  1148. <td><font size="-1">const string &amp;imageSpec_</font></td>
  1149. <td><font size="-1">Read image into current object</font></td>
  1150. </tr>
  1151. <tr>
  1152. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a>
  1153. &amp;size_, const std::string &amp;imageSpec_</font></td>
  1154. <td><font size="-1">Read image of specified size into current
  1155. object. This form is useful for images that do not specifiy their size
  1156. or to specify a size hint for decoding an image. For example, when
  1157. reading a Photo CD, JBIG, or JPEG image, a size request causes the
  1158. library to return an image which is the next resolution greater or
  1159. equal to the specified size. This may result in memory and time savings.</font></td>
  1160. </tr>
  1161. <tr>
  1162. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Blob.html">Blob</a> &amp;blob_</font></td>
  1163. <td rowspan="5"><font size="-1">Read encoded image of specified
  1164. size from an in-memory <a href="https://imagemagick.org/Magick++/Blob.html">BLOB</a> into current
  1165. object. Depending on the method arguments, the Blob size, depth, and
  1166. format may also be specified. Some image formats require that size be
  1167. specified. The default ImageMagick uses for depth depends on its
  1168. Quantum size (8 or 16).&#160; If ImageMagick's Quantum size does not
  1169. match that of the image, the depth may need to be specified.
  1170. ImageMagick can usually automagically detect the image's format.
  1171. When
  1172. a format can't be automagically detected, the format must be specified.</font></td>
  1173. </tr>
  1174. <tr>
  1175. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Blob.html">Blob</a>
  1176. &amp;blob_, const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a> &amp;size_</font></td>
  1177. </tr>
  1178. <tr>
  1179. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Blob.html">Blob</a>
  1180. &amp;blob_, const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a> &amp;size_,
  1181. size_t depth_</font></td>
  1182. </tr>
  1183. <tr>
  1184. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Blob.html">Blob</a>
  1185. &amp;blob_, const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a> &amp;size_,
  1186. size_t depth_, const string &amp;magick_&#160;</font></td>
  1187. </tr>
  1188. <tr>
  1189. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Blob.html">Blob</a>
  1190. &amp;blob_, const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a> &amp;size_,
  1191. const
  1192. string &amp;magick_</font></td>
  1193. </tr>
  1194. <tr>
  1195. <td><font size="-1">const size_t width_, const size_t
  1196. height_, std::string map_, const StorageType type_, const void *pixels_</font></td>
  1197. <td><font size="-1">Read image based on an array of image pixels.
  1198. The pixel data must be in scanline order top-to-bottom. The data can be
  1199. character, short int, integer, float, or double. Float and double
  1200. require the pixels to be normalized [0..1]. The other types are
  1201. [0..MaxRGB].&#160; For example, to create a 640x480 image from
  1202. unsigned red-green-blue character data, use</font>
  1203. <p><font size="-1">&#160; image.read( 640, 480, "RGB", CharPixel,
  1204. pixels );</font> </p>
  1205. <p><font size="-1">The parameters are as follows:</font> <br />
  1206. &#160;</p>
  1207. <table border="0" width="100%">
  1208. <tbody>
  1209. <tr>
  1210. <td><font size="-1">width_</font></td>
  1211. <td><font size="-1">Width in pixels of the image.</font></td>
  1212. </tr>
  1213. <tr>
  1214. <td><font size="-1">height_</font></td>
  1215. <td><font size="-1">Height in pixels of the image.</font></td>
  1216. </tr>
  1217. <tr>
  1218. <td><font size="-1">map_</font></td>
  1219. <td><font size="-1">This character string can be any
  1220. combination or order of R = red, G = green, B = blue, A = alpha, C =
  1221. cyan, Y = yellow M = magenta, and K = black. The ordering reflects the
  1222. order of the pixels in the supplied pixel array.</font></td>
  1223. </tr>
  1224. <tr>
  1225. <td><font size="-1">type_</font></td>
  1226. <td><font size="-1">Pixel storage type (CharPixel,
  1227. ShortPixel, IntegerPixel, FloatPixel, or DoublePixel)</font></td>
  1228. </tr>
  1229. <tr>
  1230. <td><font size="-1">pixels_</font></td>
  1231. <td><font size="-1">This array of values contain the pixel
  1232. components as defined by the map_ and type_ parameters. The length of
  1233. the arrays must equal the area specified by the width_ and height_
  1234. values and type_ parameters.</font></td>
  1235. </tr>
  1236. </tbody>
  1237. </table>
  1238. </td>
  1239. </tr>
  1240. <tr>
  1241. <td style="text-align: center;">
  1242. <center><a name="reduceNoise"></a> <font size="-1">reduceNoise</font></center>
  1243. </td>
  1244. <td><font size="-1">const double order_</font></td>
  1245. <td><font size="-1">reduce noise in image using a noise peak elimination filter.</font></td>
  1246. </tr>
  1247. <tr>
  1248. <td style="vertical-align: middle; text-align: center;"><small><a
  1249. name="randomThreshold"></a>randomThreshold<br />
  1250. </small></td>
  1251. <td style="vertical-align: middle;"><small>const Geometry
  1252. &amp;thresholds_<br />
  1253. </small></td>
  1254. <td style="vertical-align: middle;"><small>Random threshold the
  1255. image. Changes the value of individual pixels based on the intensity of
  1256. each pixel compared to a random threshold. The result is a
  1257. low-contrast, two color image. The thresholds_ argument is a
  1258. geometry containing LOWxHIGH thresholds. If the string contains
  1259. 2x2, 3x3, or 4x4, then an ordered dither of order 2, 3, or 4 will be
  1260. performed instead. This is a very fast alternative to 'quantize' based
  1261. dithering.<br />
  1262. </small></td>
  1263. </tr>
  1264. <tr>
  1265. <td style="vertical-align: middle; text-align: center;"><small><a
  1266. name="randomThresholdChannel"></a>randomThresholdChannel<br />
  1267. </small></td>
  1268. <td style="vertical-align: middle;"><small>const Geometry
  1269. &amp;thresholds_, const ChannelType channel_<br />
  1270. </small></td>
  1271. <td style="vertical-align: middle;"><small>Random threshold an
  1272. image channel. Similar to <a href="Image.html#randomThreshold">randomThreshold</a>()
  1273. but restricted to the specified channel.<br />
  1274. </small></td>
  1275. </tr>
  1276. <tr>
  1277. <td style="text-align: center;">
  1278. <center><a name="roll"></a> <font size="-1">roll</font></center>
  1279. </td>
  1280. <td><font size="-1">int columns_, ssize_t rows_</font></td>
  1281. <td><font size="-1">Roll image (rolls image vertically and
  1282. horizontally) by specified number of columnms and rows)</font></td>
  1283. </tr>
  1284. <tr>
  1285. <td style="text-align: center;">
  1286. <center><a name="rotate"></a> <font size="-1">rotate</font></center>
  1287. </td>
  1288. <td><font size="-1">double degrees_</font></td>
  1289. <td><font size="-1">Rotate image counter-clockwise by specified
  1290. number of degrees.</font></td>
  1291. </tr>
  1292. <tr>
  1293. <td style="text-align: center;">
  1294. <center><a name="sample"></a> <font size="-1">sample</font></center>
  1295. </td>
  1296. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a>
  1297. &amp;geometry_&#160;</font></td>
  1298. <td><font size="-1">Resize image by using pixel sampling algorithm</font></td>
  1299. </tr>
  1300. <tr>
  1301. <td style="text-align: center;">
  1302. <center><a name="scale"></a> <font size="-1">scale</font></center>
  1303. </td>
  1304. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a>
  1305. &amp;geometry_</font></td>
  1306. <td><font size="-1">Resize image by using simple ratio algorithm</font></td>
  1307. </tr>
  1308. <tr>
  1309. <td style="text-align: center;">
  1310. <center><a name="segment"></a> <font size="-1">segment</font></center>
  1311. </td>
  1312. <td><font size="-1">double clusterThreshold_ = 1.0,</font> <br />
  1313. <font size="-1">double smoothingThreshold_ = 1.5</font></td>
  1314. <td><font size="-1">Segment (coalesce similar image components)
  1315. by analyzing the histograms of the color components and identifying
  1316. units that are homogeneous with the fuzzy c-means technique. Also uses <i>quantizeColorSpace</i>
  1317. and <i>verbose</i> image attributes. Specify <i> clusterThreshold_</i>
  1318. ,
  1319. as the number&#160; of&#160; pixels&#160; each cluster&#160; must
  1320. exceed
  1321. the cluster threshold to be considered valid. <i>SmoothingThreshold_</i>
  1322. eliminates noise in the&#160; second derivative of the histogram. As
  1323. the
  1324. value is&#160; increased, you can&#160; expect&#160; a&#160; smoother
  1325. second derivative.&#160; The default is 1.5.</font></td>
  1326. </tr>
  1327. <tr>
  1328. <td style="text-align: center;">
  1329. <center><a name="shade"></a> <font size="-1">shade</font></center>
  1330. </td>
  1331. <td><font size="-1">double azimuth_ = 30, double elevation_ = 30,</font>
  1332. <br />
  1333. <font size="-1">bool colorShading_ = false</font></td>
  1334. <td><font size="-1">Shade image using distant light source.
  1335. Specify <i> azimuth_</i> and <i>elevation_</i> as the&#160;
  1336. position&#160; of&#160; the light source. By default, the shading
  1337. results as a grayscale image.. Set c<i>olorShading_</i> to <i>true</i>
  1338. to
  1339. shade the red, green, and blue components of the image.</font></td>
  1340. </tr>
  1341. <tr>
  1342. <td style="text-align: center;">
  1343. <center><a name="shadow"></a> <font size="-1">shadow</font></center>
  1344. </td>
  1345. <td><font size="-1">const double percent_opacity = 80, const double sigma_
  1346. = 0.5, const ssize_t x_ = 0, const ssize_t y_ = 0</font></td>
  1347. <td><font size="-1">simulate an image shadow</font></td>
  1348. </tr>
  1349. <tr>
  1350. <td style="text-align: center;">
  1351. <center><a name="sharpen"></a> <font size="-1">sharpen</font></center>
  1352. </td>
  1353. <td><font size="-1">const double radius_ = 1, const double sigma_
  1354. = 0.5</font></td>
  1355. <td><font size="-1">Sharpen pixels in image.&#160; The <i>radius_</i>
  1356. parameter specifies the radius of the Gaussian, in pixels, not counting
  1357. the center pixel.&#160; The <i>sigma_</i> parameter specifies the
  1358. standard deviation of the Laplacian, in pixels.</font></td>
  1359. </tr>
  1360. <tr>
  1361. <td style="vertical-align: middle; text-align: center;"><small><a
  1362. name="sharpenChannel"></a>sharpenChannel<br />
  1363. </small></td>
  1364. <td style="vertical-align: middle;"><small>const ChannelType
  1365. channel_, const double radius_ = 0.0, const double sigma_ = 1.0<br />
  1366. </small></td>
  1367. <td style="vertical-align: middle;"><font size="-1">Sharpen pixel
  1368. quantums in an image channel&#160; The <span
  1369. style="font-style: italic;">channel_</span> parameter specifies the
  1370. channel to sharpen..&#160; The <i>radius_</i>
  1371. parameter specifies the radius of the Gaussian, in pixels, not counting
  1372. the center pixel.&#160; The <i>sigma_</i> parameter specifies the
  1373. standard deviation of the Laplacian, in pixels.</font></td>
  1374. </tr>
  1375. <tr>
  1376. <td style="text-align: center;">
  1377. <center><a name="shave"></a> <font size="-1">shave</font></center>
  1378. </td>
  1379. <td><font size="-1">const Geometry &amp;geometry_</font></td>
  1380. <td><font size="-1">Shave pixels from image edges.</font></td>
  1381. </tr>
  1382. <tr>
  1383. <td style="text-align: center;">
  1384. <center><a name="shear"></a> <font size="-1">shear</font></center>
  1385. </td>
  1386. <td><font size="-1">double xShearAngle_, double yShearAngle_</font></td>
  1387. <td><font size="-1">Shear image (create parallelogram by sliding
  1388. image by X or Y axis).&#160; Shearing slides one edge of an image along
  1389. the X&#160; or&#160; Y axis,&#160; creating&#160; a
  1390. parallelogram.&#160; An X direction shear slides an edge along the X
  1391. axis, while&#160; a&#160; Y&#160; direction shear&#160; slides&#160;
  1392. an edge along the Y axis.&#160; The amount of the shear is controlled
  1393. by a shear angle.&#160; For X direction&#160; shears,&#160; x&#160;
  1394. degrees is measured relative to the Y axis, and similarly, for Y
  1395. direction shears&#160; y&#160; degrees is measured relative to the X
  1396. axis. Empty triangles left over from shearing the&#160; image&#160; are
  1397. filled&#160; with&#160; the&#160; color&#160; defined as <i>borderColor</i>.&#160;</font></td>
  1398. </tr>
  1399. <tr>
  1400. <td style="text-align: center;">
  1401. <center><a name="solarize"></a> <font size="-1">solarize</font></center>
  1402. </td>
  1403. <td><font size="-1">double factor_ = 50.0</font></td>
  1404. <td><font size="-1">Solarize image (similar to effect seen when
  1405. exposing a photographic film to light during the development process)</font></td>
  1406. </tr>
  1407. <tr>
  1408. <td style="text-align: center;">
  1409. <center><a name="splice"></a> <font size="-1">splice</font></center>
  1410. </td>
  1411. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a>
  1412. &amp;geometry_</font></td>
  1413. <td><font size="-1">splice the background color into the image</font></td>
  1414. </tr>
  1415. <tr>
  1416. <td style="text-align: center;">
  1417. <center><a name="spread"></a> <font size="-1">spread</font></center>
  1418. </td>
  1419. <td><font size="-1">size_t amount_ = 3</font></td>
  1420. <td><font size="-1">Spread pixels randomly within image by
  1421. specified amount</font></td>
  1422. </tr>
  1423. <tr>
  1424. <td style="text-align: center;">
  1425. <center><a name="stegano"></a> <font size="-1">stegano</font></center>
  1426. </td>
  1427. <td><font size="-1">const Image &amp;watermark_</font></td>
  1428. <td><font size="-1">Add a digital watermark to the image (based
  1429. on second image)</font></td>
  1430. </tr>
  1431. <tr>
  1432. <td>
  1433. <center><a name="sparseColor"></a> <font size="-1">sparseColor</font></center>
  1434. </td>
  1435. <td><font size="-1">const ChannelType channel, const SparseColorMethod method, const size_t number_arguments, const double *arguments </font></td>
  1436. <td><font size="-1">Sparse color image, given a set of coordinates, interpolates the colors found at those coordinates, across the whole image, using various methods.</font></td>
  1437. </tr>
  1438. <tr>
  1439. <td style="text-align: center;">
  1440. <center><a name="statistics"></a> <font size="-1">statistics</font></center>
  1441. </td>
  1442. <td><font size="-1">ImageStatistics *statistics</font></td>
  1443. <td><font size="-1">Obtain image statistics. Statistics are normalized to the range of 0.0 to 1.0 and are output to the specified ImageStatistics structure. The structure includes members maximum, minimum, mean, standard_deviation, and variance for each of these channels: red, green, blue, and opacity (e.g. statistics->red.maximum).</font></td>
  1444. </tr>
  1445. <tr>
  1446. <td style="text-align: center;">
  1447. <center><a name="stereo"></a> <font size="-1">stereo</font></center>
  1448. </td>
  1449. <td><font size="-1">const Image &amp;rightImage_</font></td>
  1450. <td><font size="-1">Create an image which appears in stereo when
  1451. viewed with red-blue glasses (Red image on left, blue on right)</font></td>
  1452. </tr>
  1453. <tr>
  1454. <td style="text-align: center;">
  1455. <center><a name="swirl"></a> <font size="-1">swirl</font></center>
  1456. </td>
  1457. <td><font size="-1">double degrees_</font></td>
  1458. <td><font size="-1">Swirl image (image pixels are rotated by
  1459. degrees)</font></td>
  1460. </tr>
  1461. <tr>
  1462. <td style="text-align: center;">
  1463. <center><a name="texture"></a> <font size="-1">texture</font></center>
  1464. </td>
  1465. <td><font size="-1">const Image &amp;texture_</font></td>
  1466. <td><font size="-1">Layer a texture on pixels matching image
  1467. background color.</font></td>
  1468. </tr>
  1469. <tr>
  1470. <td style="text-align: center;">
  1471. <center><a name="threshold"></a> <font size="-1">threshold</font></center>
  1472. </td>
  1473. <td><font size="-1">double threshold_</font></td>
  1474. <td><font size="-1">Threshold image</font></td>
  1475. </tr>
  1476. <tr>
  1477. <td style="text-align: center;" rowspan="2">
  1478. <center><a name="transform"></a> <font size="-1">transform</font></center>
  1479. </td>
  1480. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a>
  1481. &amp;imageGeometry_</font></td>
  1482. <td rowspan="2"><font size="-1">Transform image based on image
  1483. and crop geometries. Crop geometry is optional.</font></td>
  1484. </tr>
  1485. <tr>
  1486. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a>
  1487. &amp;imageGeometry_, const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a>
  1488. &amp;cropGeometry_&#160;</font></td>
  1489. </tr>
  1490. <tr>
  1491. <td style="text-align: center;">
  1492. <center><a name="transparent"></a> <font size="-1">transparent</font></center>
  1493. </td>
  1494. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Color.html">Color</a>
  1495. &amp;color_</font></td>
  1496. <td><font size="-1">Add matte image to image, setting pixels
  1497. matching color to transparent.</font></td>
  1498. </tr>
  1499. <tr>
  1500. <td style="text-align: center;">
  1501. <center><a name="trim"></a> <font size="-1">trim</font></center>
  1502. </td>
  1503. <td><font size="-1">void</font></td>
  1504. <td><font size="-1">Trim edges that are the background color from
  1505. the image.</font></td>
  1506. </tr>
  1507. <tr>
  1508. <td style="text-align: center;">
  1509. <center><a name="unsharpmask"></a> <font size="-1">unsharpmask</font></center>
  1510. </td>
  1511. <td><font size="-1">double radius_, double sigma_, double
  1512. amount_, double threshold_</font></td>
  1513. <td><font size="-1">Sharpen the image using the unsharp mask
  1514. algorithm. The <i>radius</i>_
  1515. parameter specifies the radius of the Gaussian, in pixels, not
  1516. counting the center pixel. The <i>sigma</i>_ parameter specifies the
  1517. standard deviation of the Gaussian, in pixels. The <i>amount</i>_
  1518. parameter specifies the percentage of the difference between the
  1519. original and the blur image that is added back into the original. The <i>threshold</i>_
  1520. parameter specifies the threshold in pixels needed to apply the
  1521. diffence amount.</font></td>
  1522. </tr>
  1523. <tr>
  1524. <td style="vertical-align: middle; text-align: center;"><small><a
  1525. name="unsharpmaskChannel"></a>unsharpmaskChannel<br />
  1526. </small></td>
  1527. <td style="vertical-align: middle;"><small>const ChannelType
  1528. channel_, const double radius_, const double sigma_, const double
  1529. amount_, const double threshold_<br />
  1530. </small></td>
  1531. <td style="vertical-align: middle;"><small>Sharpen an image
  1532. channel using the unsharp mask algorithm. The <span
  1533. style="font-style: italic;">channel_</span> parameter specifies the
  1534. channel to sharpen. </small><font size="-1">The <i>radius</i>_
  1535. parameter specifies the radius of the Gaussian, in pixels, not
  1536. counting the center pixel. The <i>sigma</i>_ parameter specifies the
  1537. standard deviation of the Gaussian, in pixels. The <i>amount</i>_
  1538. parameter specifies the percentage of the difference between the
  1539. original and the blur image that is added back into the original. The <i>threshold</i>_
  1540. parameter specifies the threshold in pixels needed to apply the
  1541. diffence amount.</font></td>
  1542. </tr>
  1543. <tr>
  1544. <td style="text-align: center;">
  1545. <center><a name="wave"></a> <font size="-1">wave</font></center>
  1546. </td>
  1547. <td><font size="-1">double amplitude_ = 25.0, double wavelength_
  1548. = 150.0</font></td>
  1549. <td><font size="-1">Alter an image along a sine wave.</font></td>
  1550. </tr>
  1551. <tr>
  1552. <td style="text-align: center;" rowspan="5">
  1553. <center><a name="write"></a> <font size="-1">write</font></center>
  1554. </td>
  1555. <td><font size="-1">const string &amp;imageSpec_</font></td>
  1556. <td><font size="-1">Write image to a file using filename i<i>mageSpec_</i>
  1557. .</font> <br />
  1558. <font size="-1"><b><font color="#ff0000">Caution: </font></b> if
  1559. an image format is selected which is capable of supporting fewer
  1560. colors than the original image or quantization has been requested, the
  1561. original image will be quantized to fewer colors. Use a copy of the
  1562. original if this is a problem.</font></td>
  1563. </tr>
  1564. <tr>
  1565. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Blob.html">Blob</a> *blob_</font></td>
  1566. <td rowspan="3"><font size="-1">Write image to a in-memory <a
  1567. href="https://imagemagick.org/Magick++/Blob.html"> BLOB</a> stored in <i>blob_</i>. The <i>magick</i>_
  1568. parameter specifies the image format to write (defaults to <a
  1569. href="Image.html#magick">magick</a> ). The depth_ parameter species the image
  1570. depth (defaults to <a href="Image.html#depth"> depth</a> ).</font> <br />
  1571. <font size="-1"><b><font color="#ff0000">Caution: </font></b> if
  1572. an image format is selected which is capable of supporting fewer
  1573. colors than the original image or quantization has been requested, the
  1574. original image will be quantized to fewer colors. Use a copy of the
  1575. original if this is a problem.</font></td>
  1576. </tr>
  1577. <tr>
  1578. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Blob.html">Blob</a> *blob_,
  1579. std::string &amp;magick_</font></td>
  1580. </tr>
  1581. <tr>
  1582. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Blob.html">Blob</a> *blob_,
  1583. std::string &amp;magick_, size_t depth_</font></td>
  1584. </tr>
  1585. <tr>
  1586. <td><font size="-1">const ssize_t x_, const ssize_t y_, const size_t
  1587. columns_, const size_t rows_, const std::string &amp;map_,
  1588. const StorageType type_, void *pixels_</font></td>
  1589. <td><font size="-1">Write pixel data into a buffer you supply.
  1590. The data is saved either as char, short int, integer, float or double
  1591. format in the order specified by the type_ parameter. For example, we
  1592. want to extract scanline 1 of a 640x480 image as character data in
  1593. red-green-blue order:</font>
  1594. <p><font size="-1">&#160; image.write(0,0,640,1,"RGB",0,pixels);</font>
  1595. </p>
  1596. <p><font size="-1">The parameters are as follows:</font> <br />
  1597. &#160;</p>
  1598. <table border="0" width="100%">
  1599. <tbody>
  1600. <tr>
  1601. <td><font size="-1">x_</font></td>
  1602. <td><font size="-1">Horizontal ordinate of left-most
  1603. coordinate of region to extract.</font></td>
  1604. </tr>
  1605. <tr>
  1606. <td><font size="-1">y_</font></td>
  1607. <td><font size="-1">Vertical ordinate of top-most
  1608. coordinate of region to extract.</font></td>
  1609. </tr>
  1610. <tr>
  1611. <td><font size="-1">columns_</font></td>
  1612. <td><font size="-1">Width in pixels of the region to
  1613. extract.</font></td>
  1614. </tr>
  1615. <tr>
  1616. <td><font size="-1">rows_</font></td>
  1617. <td><font size="-1">Height in pixels of the region to
  1618. extract.</font></td>
  1619. </tr>
  1620. <tr>
  1621. <td><font size="-1">map_</font></td>
  1622. <td><font size="-1">This character string can be any
  1623. combination or order of R = red, G = green, B = blue, A = alpha, C =
  1624. cyan, Y = yellow, M = magenta, and K = black. The ordering reflects
  1625. the order of the pixels in the supplied pixel array.</font></td>
  1626. </tr>
  1627. <tr>
  1628. <td><font size="-1">type_</font></td>
  1629. <td><font size="-1">Pixel storage type (CharPixel,
  1630. ShortPixel, IntegerPixel, FloatPixel, or DoublePixel)</font></td>
  1631. </tr>
  1632. <tr>
  1633. <td><font size="-1">pixels_</font></td>
  1634. <td><font size="-1">This array of values contain the pixel
  1635. components as defined by the map_ and type_ parameters. The length of
  1636. the arrays must equal the area specified by the width_ and height_
  1637. values and type_ parameters.</font></td>
  1638. </tr>
  1639. </tbody>
  1640. </table>
  1641. </td>
  1642. </tr>
  1643. <tr>
  1644. <td style="text-align: center;">
  1645. <center><a name="resize"></a> <font size="-1">resize</font></center>
  1646. </td>
  1647. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a>
  1648. &amp;geometry_</font></td>
  1649. <td><font size="-1">Resize image to specified size.</font></td>
  1650. </tr>
  1651. </tbody>
  1652. </table>
  1653. <center>
  1654. <h3> <a name="Image Attributes"></a> Image Attributes</h3>
  1655. </center>
  1656. Image attributes are set and obtained via methods in Image. Except for
  1657. methods which accept pointer arguments (e.g. c<tt>hromaBluePrimary)</tt>
  1658. all methods return attributes by value.
  1659. <p>Image attributes are easily used. For example, to set the resolution
  1660. of the TIFF file "file.tiff" to 150 dots-per-inch (DPI) in both the
  1661. horizontal and vertical directions, you can use the following example
  1662. code: </p>
  1663. <pre class="code">
  1664. string filename("file.tiff");
  1665. Image image;
  1666. image.read(filename);
  1667. image.resolutionUnits(PixelsPerInchResolution);
  1668. image.density(Geometry(150,150)); // could also use image.density("150x150")
  1669. image.write(filename)
  1670. </pre>
  1671. The supported image attributes and the method arguments required to
  1672. obtain them are shown in the following table: <br />
  1673. &#160;
  1674. <table border="1">
  1675. <caption>Image Attributes</caption> <tbody>
  1676. <tr>
  1677. <td>
  1678. <center><b>Function</b></center>
  1679. </td>
  1680. <td>
  1681. <center><b>Type</b></center>
  1682. </td>
  1683. <td>
  1684. <center><b>Get Signature</b></center>
  1685. </td>
  1686. <td>
  1687. <center><b>Set Signature</b></center>
  1688. </td>
  1689. <td>
  1690. <center><b>Description</b></center>
  1691. </td>
  1692. </tr>
  1693. <tr>
  1694. <td>
  1695. <center><a name="adjoin"></a> <font size="-1">adjoin</font></center>
  1696. </td>
  1697. <td><font size="-1">bool</font></td>
  1698. <td><font size="-1">void</font></td>
  1699. <td><font size="-1">bool flag_</font></td>
  1700. <td><font size="-1">Join images into a single multi-image file.</font></td>
  1701. </tr>
  1702. <tr>
  1703. <td>
  1704. <center><a name="antiAlias"></a> <font size="-1">antiAlias</font></center>
  1705. </td>
  1706. <td><font size="-1">bool</font></td>
  1707. <td><font size="-1">void</font></td>
  1708. <td><font size="-1">bool flag_</font></td>
  1709. <td><font size="-1">Control antialiasing of rendered Postscript
  1710. and Postscript or TrueType fonts. Enabled by default.</font></td>
  1711. </tr>
  1712. <tr>
  1713. <td>
  1714. <center><a name="animationDelay"></a> <font size="-1">animation-</font>
  1715. <br />
  1716. <font size="-1">Delay</font></center>
  1717. </td>
  1718. <td><font size="-1">size_t (0 to 65535)</font></td>
  1719. <td><font size="-1">void</font></td>
  1720. <td><font size="-1">size_t delay_</font></td>
  1721. <td><font size="-1">Time in 1/100ths of a second (0 to 65535)
  1722. which must expire before displaying the next image in an animated
  1723. sequence. This option is useful for regulating the animation of a
  1724. sequence&#160; of GIF images within Netscape.</font></td>
  1725. </tr>
  1726. <tr>
  1727. <td>
  1728. <center><a name="animationIterations"></a> <font size="-1">animation-</font>
  1729. <br />
  1730. <font size="-1">Iterations</font></center>
  1731. </td>
  1732. <td><font size="-1">size_t</font></td>
  1733. <td><font size="-1">void</font></td>
  1734. <td><font size="-1">size_t iterations_</font></td>
  1735. <td><font size="-1">Number of iterations to loop an animation
  1736. (e.g. Netscape loop extension) for.</font></td>
  1737. </tr>
  1738. <tr>
  1739. <td style="vertical-align: middle; text-align: center;"><small><a
  1740. name="attribute"></a>attribute<br />
  1741. </small></td>
  1742. <td style="vertical-align: middle;"><small>string<br />
  1743. </small></td>
  1744. <td style="vertical-align: top;" valign="top"><small>const
  1745. std::string name_<br />
  1746. </small></td>
  1747. <td style="vertical-align: top;" valign="top"><small>const
  1748. std::string name_, const std::string value_</small></td>
  1749. <td style="vertical-align: middle;"><small>An arbitrary named
  1750. image attribute. Any number of named attributes may be attached to the
  1751. image. For example, the image comment is a named image attribute with
  1752. the name "comment". EXIF tags are attached to the image as named
  1753. attributes. Use the syntax "EXIF:&lt;tag&gt;" to request an EXIF tag
  1754. similar to "EXIF:DateTime".</small><br />
  1755. </td>
  1756. </tr>
  1757. <tr>
  1758. <td>
  1759. <center><a name="backgroundColor"></a> <font size="-1">background-</font>
  1760. <br />
  1761. <font size="-1">Color</font></center>
  1762. </td>
  1763. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Color.html">Color</a> </font></td>
  1764. <td><font size="-1">void</font></td>
  1765. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Color.html">Color</a>
  1766. &amp;color_</font></td>
  1767. <td><font size="-1">Image background color</font></td>
  1768. </tr>
  1769. <tr>
  1770. <td>
  1771. <center><a name="backgroundTexture"></a> <font size="-1">background-</font>
  1772. <br />
  1773. <font size="-1">Texture</font></center>
  1774. </td>
  1775. <td><font size="-1">string</font></td>
  1776. <td><font size="-1">void</font></td>
  1777. <td><font size="-1">const string &amp;texture_</font></td>
  1778. <td><font size="-1">Image file name to use as the background
  1779. texture. Does not modify image pixels.</font></td>
  1780. </tr>
  1781. <tr>
  1782. <td>
  1783. <center><a name="baseColumns"></a> <font size="-1">baseColumns</font></center>
  1784. </td>
  1785. <td><font size="-1">size_t</font></td>
  1786. <td><font size="-1">void</font></td>
  1787. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  1788. <td><font size="-1">Base image width (before transformations)</font></td>
  1789. </tr>
  1790. <tr>
  1791. <td>
  1792. <center><a name="baseFilename"></a> <font size="-1">baseFilename</font></center>
  1793. </td>
  1794. <td><font size="-1">string</font></td>
  1795. <td><font size="-1">void</font></td>
  1796. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  1797. <td><font size="-1">Base image filename (before transformations)</font></td>
  1798. </tr>
  1799. <tr>
  1800. <td>
  1801. <center><a name="baseRows"></a> <font size="-1">baseRows</font></center>
  1802. </td>
  1803. <td><font size="-1">size_t</font></td>
  1804. <td><font size="-1">void</font></td>
  1805. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  1806. <td><font size="-1">Base image height (before transformations)</font></td>
  1807. </tr>
  1808. <tr>
  1809. <td>
  1810. <center><a name="borderColor"></a> <font size="-1">borderColor</font></center>
  1811. </td>
  1812. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Color.html">Color</a> </font></td>
  1813. <td><font size="-1">void</font></td>
  1814. <td><font size="-1">&#160;const <a href="https://imagemagick.org/Magick++/Color.html">Color</a>
  1815. &amp;color_</font></td>
  1816. <td><font size="-1">Image border color</font></td>
  1817. </tr>
  1818. <tr>
  1819. <td><a name="boundingBox"></a> <font size="-1">boundingBox</font></td>
  1820. <td><font size="-1">Geometry</font></td>
  1821. <td><font size="-1">void</font></td>
  1822. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  1823. <td><font size="-1">Return smallest bounding box enclosing
  1824. non-border pixels. The current fuzz value is used when discriminating
  1825. between pixels. This is the crop bounding box used by
  1826. crop(Geometry(0,0)).</font></td>
  1827. </tr>
  1828. <tr>
  1829. <td>
  1830. <center><a name="boxColor"></a> <font size="-1">boxColor</font></center>
  1831. </td>
  1832. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Color.html">Color</a> </font></td>
  1833. <td><font size="-1">void</font></td>
  1834. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Color.html">Color</a>
  1835. &amp;boxColor_</font></td>
  1836. <td><font size="-1">Base color that annotation text is rendered
  1837. on.</font></td>
  1838. </tr>
  1839. <tr>
  1840. <td><a name="cacheThreshold"></a> <font size="-1">cacheThreshold</font></td>
  1841. <td><font size="-1">size_t</font></td>
  1842. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  1843. <td><font size="-1">const size_t</font></td>
  1844. <td><font size="-1">Pixel cache threshold in bytes. Once this
  1845. threshold is exceeded, all subsequent pixels cache operations are
  1846. to/from disk. This is a static method and the attribute it sets is
  1847. shared by all Image objects.</font></td>
  1848. </tr>
  1849. <tr>
  1850. <td style="vertical-align: middle;" valign="middle"><small><a
  1851. name="channelDepth"></a>channelDepth<br />
  1852. </small></td>
  1853. <td style="vertical-align: middle;" valign="middle"><small>size_t
  1854. <br />
  1855. </small></td>
  1856. <td style="vertical-align: middle;" valign="middle"><small>const
  1857. ChannelType channel_<br />
  1858. </small></td>
  1859. <td style="vertical-align: middle;"><small>const ChannelType
  1860. channel_, const size_t depth_<br />
  1861. </small></td>
  1862. <td style="vertical-align: middle;"><small>Channel modulus depth.
  1863. The channel modulus depth represents the minimum number of bits
  1864. required
  1865. to support the channel without loss. Setting the channel's modulus
  1866. depth
  1867. modifies the channel (i.e. discards resolution) if the requested
  1868. modulus
  1869. depth is less than the current modulus depth, otherwise the channel is
  1870. not altered. There is no attribute associated with the modulus depth so
  1871. the current modulus depth is obtained by inspecting the pixels. As a
  1872. result, the depth returned may be less than the most recently set
  1873. channel depth. Subsequent image processing may result in increasing the
  1874. channel depth.<br />
  1875. </small></td>
  1876. </tr>
  1877. <tr>
  1878. <td>
  1879. <center><a name="chromaBluePrimary"></a> <font size="-1">chroma-</font>
  1880. <br />
  1881. <font size="-1">BluePrimary</font></center>
  1882. </td>
  1883. <td><font size="-1">double x &amp; y</font></td>
  1884. <td><font size="-1">double *x_, double *y_</font></td>
  1885. <td><font size="-1">double x_, double y_</font></td>
  1886. <td><font size="-1">Chromaticity blue primary point (e.g. x=0.15,
  1887. y=0.06)</font></td>
  1888. </tr>
  1889. <tr>
  1890. <td>
  1891. <center><a name="chromaGreenPrimary"></a> <font size="-1">chroma-</font>
  1892. <br />
  1893. <font size="-1">GreenPrimary</font></center>
  1894. </td>
  1895. <td><font size="-1">double x &amp; y</font></td>
  1896. <td><font size="-1">double *x_, double *y_</font></td>
  1897. <td><font size="-1">double x_, double y_</font></td>
  1898. <td><font size="-1">Chromaticity green primary point (e.g. x=0.3,
  1899. y=0.6)</font></td>
  1900. </tr>
  1901. <tr>
  1902. <td>
  1903. <center><a name="chromaRedPrimary"></a> <font size="-1">chroma-</font>
  1904. <br />
  1905. <font size="-1">RedPrimary</font></center>
  1906. </td>
  1907. <td><font size="-1">double x &amp; y</font></td>
  1908. <td><font size="-1">double *x_, double *y_</font></td>
  1909. <td><font size="-1">double x_, double y_</font></td>
  1910. <td><font size="-1">Chromaticity red primary point (e.g. x=0.64,
  1911. y=0.33)</font></td>
  1912. </tr>
  1913. <tr>
  1914. <td>
  1915. <center><a name="chromaWhitePoint"></a> <font size="-1">chroma-</font>
  1916. <br />
  1917. <font size="-1">WhitePoint</font></center>
  1918. </td>
  1919. <td><font size="-1">double x &amp; y</font></td>
  1920. <td><font size="-1">double*x_, double *y_</font></td>
  1921. <td><font size="-1">double x_, double y_</font></td>
  1922. <td><font size="-1">Chromaticity white point (e.g. x=0.3127,
  1923. y=0.329)</font></td>
  1924. </tr>
  1925. <tr>
  1926. <td>
  1927. <center><a name="classType"></a> <font size="-1">classType</font></center>
  1928. </td>
  1929. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Enumerations.html#ClassType">ClassType</a>
  1930. </font></td>
  1931. <td><font size="-1">void</font></td>
  1932. <td><font size="-1">&#160;<a href="https://imagemagick.org/Magick++/Enumerations.html#ClassType">ClassType</a>
  1933. class_</font></td>
  1934. <td><font size="-1">Image storage class.&#160; Note that
  1935. conversion from a DirectClass image to a PseudoClass image may result
  1936. in a loss of color due to the limited size of the palette (256 or
  1937. 65535 colors).</font></td>
  1938. </tr>
  1939. <tr>
  1940. <td>
  1941. <center><a name="clipMask"></a> <font size="-1">clipMask</font></center>
  1942. </td>
  1943. <td><font size="-1">Image</font></td>
  1944. <td><font size="-1">void</font></td>
  1945. <td><font size="-1">const Image &amp;clipMask_</font></td>
  1946. <td><font size="-1">Associate a clip mask image with the current
  1947. image. The clip mask image must have the same dimensions as the current
  1948. image or an exception is thrown. Clipping occurs wherever pixels are
  1949. transparent in the clip mask image. Clipping Pass an invalid image to
  1950. unset an existing clip mask.</font></td>
  1951. </tr>
  1952. <tr>
  1953. <td>
  1954. <center><a name="colorFuzz"></a> <font size="-1">colorFuzz</font></center>
  1955. </td>
  1956. <td><font size="-1">double</font></td>
  1957. <td><font size="-1">void</font></td>
  1958. <td><font size="-1">double fuzz_</font></td>
  1959. <td><font size="-1">Colors within this distance are considered
  1960. equal. A number of algorithms search for a target&#160; color. By
  1961. default the color must be exact. Use this option to match colors that
  1962. are close to the target color in RGB space.</font></td>
  1963. </tr>
  1964. <tr>
  1965. <td>
  1966. <center><a name="colorMap"></a> <font size="-1">colorMap</font></center>
  1967. </td>
  1968. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Color.html">Color</a> </font></td>
  1969. <td><font size="-1">size_t index_</font></td>
  1970. <td><font size="-1">size_t index_, const <a
  1971. href="https://imagemagick.org/Magick++/Color.html"> Color</a> &amp;color_</font></td>
  1972. <td><font size="-1">Color at colormap index.</font></td>
  1973. </tr>
  1974. <tr>
  1975. <td valign="middle">
  1976. <div style="text-align:center"><a name="colorMapSize"></a> <font size="-1">colorMapSize<br />
  1977. </font></div>
  1978. </td>
  1979. <td valign="middle"><font size="-1">size_t<br />
  1980. </font></td>
  1981. <td valign="middle"><font size="-1">void<br />
  1982. </font></td>
  1983. <td valign="middle"><font size="-1">size_t entries_<br />
  1984. </font></td>
  1985. <td valign="middle"><font size="-1">Number of entries in the
  1986. colormap. Setting the colormap size may extend or truncate the
  1987. colormap.
  1988. The maximum number of supported entries is specified by the <i>MaxColormapSize</i>constant,
  1989. and is dependent on the value of QuantumDepth when ImageMagick is
  1990. compiled. An exception is thrown if more entries are requested than may
  1991. be supported. Care should be taken when truncating the colormap to
  1992. ensure that the image colormap indexes reference valid colormap entries.</font><br />
  1993. </td>
  1994. </tr>
  1995. <tr>
  1996. <td>
  1997. <center><a name="colorSpace"></a> <font size="-1">colorSpace</font></center>
  1998. </td>
  1999. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Enumerations.html#ColorspaceType">ColorspaceType</a>
  2000. colorSpace_</font></td>
  2001. <td><font size="-1">void</font></td>
  2002. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Enumerations.html#ColorspaceType">ColorspaceType</a>
  2003. colorSpace_</font></td>
  2004. <td><font size="-1">The colorspace (e.g. CMYK) used to represent
  2005. the image pixel colors. Image pixels are always stored as RGB(A) except
  2006. for the case of CMY(K).</font></td>
  2007. </tr>
  2008. <tr>
  2009. <td>
  2010. <center><a name="columns"></a> <font size="-1">columns</font></center>
  2011. </td>
  2012. <td><font size="-1">size_t</font></td>
  2013. <td><font size="-1">void</font></td>
  2014. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  2015. <td><font size="-1">Image width</font></td>
  2016. </tr>
  2017. <tr>
  2018. <td>
  2019. <center><a name="comment"></a> <font size="-1">comment</font></center>
  2020. </td>
  2021. <td><font size="-1">string</font></td>
  2022. <td><font size="-1">void</font></td>
  2023. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  2024. <td><font size="-1">Image comment</font></td>
  2025. </tr>
  2026. <tr>
  2027. <td>
  2028. <center><a name="compose"></a> <font size="-1">compose</font></center>
  2029. </td>
  2030. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Enumerations.html#CompositeOperator">CompositeOperator</a>
  2031. </font></td>
  2032. <td><small><font size="-1"><small>void</small></font></small></td>
  2033. <td><small><font size="-1"><small><a
  2034. href="https://imagemagick.org/Magick++/Enumerations.html#CompositeOperator">CompositeOperator</a>
  2035. compose_</small></font></small></td>
  2036. <td><font size="-1">Composition operator to be used when
  2037. composition is implicitly used (such as for image flattening).</font></td>
  2038. </tr>
  2039. <tr>
  2040. <td>
  2041. <center><a name="compressType"></a> <font size="-1">compress-</font>
  2042. <br />
  2043. <font size="-1">Type</font></center>
  2044. </td>
  2045. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Enumerations.html#CompressionType">CompressionType</a>
  2046. </font></td>
  2047. <td><small><font size="-1"><small>void</small></font></small></td>
  2048. <td><small><font size="-1"><small><a
  2049. href="https://imagemagick.org/Magick++/Enumerations.html#CompressionType">CompressionType</a>
  2050. compressType_</small></font></small></td>
  2051. <td><font size="-1">Image compresion type. The default is the
  2052. compression type of the specified image file.</font></td>
  2053. </tr>
  2054. <tr>
  2055. <td>
  2056. <center><a name="debug"></a> <font size="-1">debug</font></center>
  2057. </td>
  2058. <td><font size="-1">bool</font></td>
  2059. <td><small><font size="-1"><small>void</small></font></small></td>
  2060. <td><small><font size="-1"><small>bool flag_</small></font></small></td>
  2061. <td><font size="-1">Enable printing of internal debug messages
  2062. from ImageMagick as it executes.</font></td>
  2063. </tr>
  2064. <tr>
  2065. <td style="text-align: center; vertical-align: middle;"><small><a
  2066. name="defineValue"></a>defineValue<br />
  2067. </small></td>
  2068. <td style="vertical-align: middle; text-align: left;"><small>string<br />
  2069. </small></td>
  2070. <td style="vertical-align: middle;"><small>const std::string
  2071. &amp;magick_, const std::string &amp;key_<br />
  2072. </small></td>
  2073. <td style="vertical-align: middle;"><small>const std::string
  2074. &amp;magick_, const std::string &amp;key_, &#160;const std::string
  2075. &amp;value_<br />
  2076. </small></td>
  2077. <td style="vertical-align: top;"><small>Set or obtain a
  2078. definition string to applied when encoding or decoding the specified
  2079. format. The meanings of the definitions are format specific. The format
  2080. is designated by the <span style="font-style: italic;">magick_</span>
  2081. argument, the format-specific key is designated by <span
  2082. style="font-style: italic;">key_</span>, and the associated value is
  2083. specified by <span style="font-style: italic;">value_</span>. See the
  2084. defineSet() method if the key must be removed entirely.</small><br />
  2085. </td>
  2086. </tr>
  2087. <tr>
  2088. <td style="text-align: center; vertical-align: middle;"><small><a
  2089. name="defineSet"></a>defineSet<br />
  2090. </small></td>
  2091. <td style="vertical-align: middle; text-align: left;"><small>bool<br />
  2092. </small></td>
  2093. <td style="vertical-align: middle;"><small>const std::string
  2094. &amp;magick_, const std::string &amp;key_<br />
  2095. </small></td>
  2096. <td style="vertical-align: middle;"><small>const std::string
  2097. &amp;magick_, const std::string &amp;key_, bool flag_<br />
  2098. </small></td>
  2099. <td style="vertical-align: middle;"><small>Set or obtain a
  2100. definition flag to applied when encoding or decoding the specified
  2101. format.</small><small>. Similar to the defineValue() method except that
  2102. passing the <span style="font-style: italic;">flag_</span> value
  2103. 'true'
  2104. creates a value-less define with that format and key. Passing the <span
  2105. style="font-style: italic;">f</span><span style="font-style: italic;">lag_</span>
  2106. value 'false' removes any existing matching definition. The method
  2107. returns 'true' if a matching key exists, and 'false' if no matching key
  2108. exists.<br />
  2109. </small></td>
  2110. </tr>
  2111. <tr>
  2112. <td>
  2113. <center><a name="density"></a> <font size="-1">density</font></center>
  2114. </td>
  2115. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a> &#160;
  2116. (default 72x72)</font></td>
  2117. <td><font size="-1">void</font></td>
  2118. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a>
  2119. &amp;density_</font></td>
  2120. <td><font size="-1">Vertical and horizontal resolution in pixels
  2121. of the image. This option specifies an image density when decoding a
  2122. Postscript or Portable Document page. Often used with <i>psPageSize</i>.</font></td>
  2123. </tr>
  2124. <tr>
  2125. <td>
  2126. <center><a name="depth"></a> <font size="-1">depth</font></center>
  2127. </td>
  2128. <td><font size="-1">&#160;size_t (8-32)</font></td>
  2129. <td><font size="-1">void</font></td>
  2130. <td><font size="-1">size_t depth_</font></td>
  2131. <td><font size="-1">Image depth. Used to specify the bit depth
  2132. when reading or writing&#160; raw images or when the output format
  2133. supports multiple depths. Defaults to the quantum depth that
  2134. ImageMagick is compiled with.</font></td>
  2135. </tr>
  2136. <tr>
  2137. <td>
  2138. <center><a name="endian"></a> <font size="-1">endian</font></center>
  2139. </td>
  2140. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Enumerations.html#EndianType">EndianType</a>
  2141. </font></td>
  2142. <td><font size="-1">void</font></td>
  2143. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Enumerations.html#EndianType">EndianType</a>
  2144. endian_</font></td>
  2145. <td><font size="-1">Specify (or obtain) endian option for formats
  2146. which support it.</font></td>
  2147. </tr>
  2148. <tr>
  2149. <td>
  2150. <center><a name="directory"></a> <font size="-1">directory</font></center>
  2151. </td>
  2152. <td><font size="-1">string</font></td>
  2153. <td><font size="-1">void</font></td>
  2154. <td><font size="-1">&#160;</font></td>
  2155. <td><font size="-1">Tile names from within an image montage</font></td>
  2156. </tr>
  2157. <tr>
  2158. <td>
  2159. <center><a name="file"></a> <font size="-1">file</font></center>
  2160. </td>
  2161. <td><font size="-1">FILE *</font></td>
  2162. <td><font size="-1">FILE *</font></td>
  2163. <td><font size="-1">FILE *file_</font></td>
  2164. <td><font size="-1">Image file descriptor.</font></td>
  2165. </tr>
  2166. <tr>
  2167. <td>
  2168. <center><a name="fileName"></a> <font size="-1">fileName</font></center>
  2169. </td>
  2170. <td><font size="-1">string</font></td>
  2171. <td><font size="-1">void</font></td>
  2172. <td><font size="-1">const string &amp;fileName_</font></td>
  2173. <td><font size="-1">Image file name.</font></td>
  2174. </tr>
  2175. <tr>
  2176. <td>
  2177. <center><a name="fileSize"></a> <font size="-1">fileSize</font></center>
  2178. </td>
  2179. <td><font size="-1">off_t</font></td>
  2180. <td><font size="-1">void</font></td>
  2181. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  2182. <td><font size="-1">Number of bytes of the image on disk</font></td>
  2183. </tr>
  2184. <tr>
  2185. <td>
  2186. <center><a name="fillColor"></a> <font size="-1">fillColor</font></center>
  2187. </td>
  2188. <td><font size="-1">Color</font></td>
  2189. <td><font size="-1">void</font></td>
  2190. <td><font size="-1">const Color &amp;fillColor_</font></td>
  2191. <td><font size="-1">Color to use when filling drawn objects</font></td>
  2192. </tr>
  2193. <tr>
  2194. <td>
  2195. <center><a name="fillPattern"></a> <font size="-1">fillPattern</font></center>
  2196. </td>
  2197. <td><font size="-1">Image</font></td>
  2198. <td><font size="-1">void</font></td>
  2199. <td><font size="-1">const Image &amp;fillPattern_</font></td>
  2200. <td><font size="-1">Pattern image to use when filling drawn
  2201. objects.</font></td>
  2202. </tr>
  2203. <tr>
  2204. <td>
  2205. <center><a name="fillRule"></a> <font size="-1">fillRule</font></center>
  2206. </td>
  2207. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Enumerations.html#FillRule">FillRule</a>
  2208. </font></td>
  2209. <td><font size="-1">void</font></td>
  2210. <td><font size="-1">const Magick::FillRule &amp;fillRule_</font></td>
  2211. <td><font size="-1">Rule to use when filling drawn objects.</font></td>
  2212. </tr>
  2213. <tr>
  2214. <td>
  2215. <center><a name="filterType"></a> <font size="-1">filterType</font></center>
  2216. </td>
  2217. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Enumerations.html#FilterTypes">FilterTypes</a>
  2218. </font></td>
  2219. <td><font size="-1">void</font></td>
  2220. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Enumerations.html#FilterTypes">FilterTypes</a>
  2221. filterType_</font></td>
  2222. <td><font size="-1">Filter to use when resizing image. The
  2223. reduction filter employed has a sigificant effect on the time required
  2224. to resize an image and the resulting quality. The default filter is <i>Lanczos</i>
  2225. which has been shown to produce high quality results when reducing most
  2226. images.</font></td>
  2227. </tr>
  2228. <tr>
  2229. <td>
  2230. <center><a name="font"></a> <font size="-1">font</font></center>
  2231. </td>
  2232. <td><font size="-1">string</font></td>
  2233. <td><font size="-1">void</font></td>
  2234. <td><font size="-1">const string &amp;font_</font></td>
  2235. <td><font size="-1">Text rendering font. If the font is a fully
  2236. qualified X server font name, the font is obtained from an X&#160;
  2237. server. To use a TrueType font, precede the TrueType filename with an
  2238. @. Otherwise, specify&#160; a&#160; Postscript font name (e.g.
  2239. "helvetica").</font></td>
  2240. </tr>
  2241. <tr>
  2242. <td>
  2243. <center><a name="fontPointsize"></a> <font size="-1">fontPointsize</font></center>
  2244. </td>
  2245. <td><font size="-1">size_t</font></td>
  2246. <td><font size="-1">void</font></td>
  2247. <td><font size="-1">size_t pointSize_</font></td>
  2248. <td><font size="-1">Text rendering font point size</font></td>
  2249. </tr>
  2250. <tr>
  2251. <td>
  2252. <center><a name="fontTypeMetrics"></a> <font size="-1">fontTypeMetrics</font></center>
  2253. </td>
  2254. <td><font size="-1"><a href="https://imagemagick.org/Magick++/TypeMetric.html">TypeMetric</a> </font></td>
  2255. <td><font size="-1">const std::string &amp;text_, <a
  2256. href="https://imagemagick.org/Magick++/TypeMetric.html"> TypeMetric</a> *metrics</font></td>
  2257. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  2258. <td><font size="-1">Update metrics with font type metrics using
  2259. specified <i>text</i>, and current <a href="Image.html#font">font</a> and <a
  2260. href="Image.html#fontPointsize">fontPointSize</a> settings.</font></td>
  2261. </tr>
  2262. <tr>
  2263. <td>
  2264. <center><a name="format"></a> <font size="-1">format</font></center>
  2265. </td>
  2266. <td><font size="-1">string</font></td>
  2267. <td><font size="-1">void</font></td>
  2268. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  2269. <td><font size="-1">Long form image format description.</font></td>
  2270. </tr>
  2271. <tr>
  2272. <td>
  2273. <center><a name="gamma"></a> <font size="-1">gamma</font></center>
  2274. </td>
  2275. <td><font size="-1">double (typical range 0.8 to 2.3)</font></td>
  2276. <td><font size="-1">void</font></td>
  2277. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  2278. <td><font size="-1">Gamma level of the image. The same color
  2279. image displayed on two different&#160; workstations&#160; may&#160;
  2280. look&#160; different due to differences in the display monitor.&#160;
  2281. Use gamma correction&#160; to&#160; adjust&#160; for this&#160;
  2282. color&#160; difference.</font></td>
  2283. </tr>
  2284. <tr>
  2285. <td>
  2286. <center><a name="geometry"></a> <font size="-1">geometry</font></center>
  2287. </td>
  2288. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a> </font></td>
  2289. <td><font size="-1">void</font></td>
  2290. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  2291. <td><font size="-1">Preferred size of the image when encoding.</font></td>
  2292. </tr>
  2293. <tr>
  2294. <td>
  2295. <center><a name="gifDisposeMethod"></a> <font size="-1">gifDispose-</font>
  2296. <br />
  2297. <font size="-1">Method</font></center>
  2298. </td>
  2299. <td><font size="-1">size_t</font> <br />
  2300. <font size="-1">{ 0 = Disposal not specified,</font> <br />
  2301. <font size="-1">1 = Do not dispose of graphic,</font> <br />
  2302. <font size="-1">3 = Overwrite graphic with background color,</font>
  2303. <br />
  2304. <font size="-1">4 = Overwrite graphic with previous graphic. }</font></td>
  2305. <td><font size="-1">void</font></td>
  2306. <td><font size="-1">size_t disposeMethod_</font></td>
  2307. <td><font size="-1">GIF disposal method. This option is used to
  2308. control how successive frames are rendered (how the preceding frame is
  2309. disposed of) when creating a GIF animation.</font></td>
  2310. </tr>
  2311. <tr>
  2312. <td>
  2313. <center><a name="iccColorProfile"></a> <font size="-1">iccColorProfile</font></center>
  2314. </td>
  2315. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Blob.html">Blob</a> </font></td>
  2316. <td><font size="-1">void</font></td>
  2317. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Blob.html">Blob</a>
  2318. &amp;colorProfile_</font></td>
  2319. <td><font size="-1">ICC color profile. Supplied via a <a
  2320. href="https://imagemagick.org/Magick++/Blob.html"> Blob</a> since Magick++/ and ImageMagick do not
  2321. currently support formating this data structure directly.&#160;
  2322. Specifications are available from the <a href="http://www.color.org/">
  2323. International Color Consortium</a> for the format of ICC color profiles.</font></td>
  2324. </tr>
  2325. <tr>
  2326. <td>
  2327. <center><a name="interlaceType"></a> <font size="-1">interlace-</font>
  2328. <br />
  2329. <font size="-1">Type</font></center>
  2330. </td>
  2331. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Enumerations.html#InterlaceType">InterlaceType</a>
  2332. </font></td>
  2333. <td><font size="-1">void</font></td>
  2334. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Enumerations.html#InterlaceType">InterlaceType</a>
  2335. interlace_</font></td>
  2336. <td><font size="-1">The type of interlacing scheme (default <i>NoInterlace</i>
  2337. ). This option is used to specify the type of&#160; interlacing
  2338. scheme&#160; for&#160; raw&#160; image formats such as RGB or YUV. <i>NoInterlace</i>
  2339. means do not&#160; interlace, <i>LineInterlace</i> uses scanline
  2340. interlacing, and <i>PlaneInterlace</i> uses plane interlacing. <i>
  2341. PartitionInterlace</i> is like <i>PlaneInterlace</i> except the&#160;
  2342. different planes&#160; are saved&#160; to individual files (e.g.&#160;
  2343. image.R, image.G, and image.B). Use <i>LineInterlace</i> or <i>
  2344. PlaneInterlace</i> to create an interlaced GIF or progressive JPEG
  2345. image.</font></td>
  2346. </tr>
  2347. <tr>
  2348. <td>
  2349. <center><a name="iptcProfile"></a> <font size="-1">iptcProfile</font></center>
  2350. </td>
  2351. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Blob.html">Blob</a> </font></td>
  2352. <td><font size="-1">void</font></td>
  2353. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Blob.html">Blob</a> &amp;
  2354. iptcProfile_</font></td>
  2355. <td><font size="-1">IPTC profile. Supplied via a <a
  2356. href="https://imagemagick.org/Magick++/Blob.html"> Blob</a> since Magick++ and ImageMagick do not
  2357. currently&#160; support formating this data structure directly.
  2358. Specifications are available from the <a href="http://www.iptc.org/">
  2359. International Press Telecommunications Council</a> for IPTC profiles.</font></td>
  2360. </tr>
  2361. <tr>
  2362. <td>
  2363. <center><a name="label"></a> <font size="-1">label</font></center>
  2364. </td>
  2365. <td><font size="-1">string</font></td>
  2366. <td><font size="-1">void</font></td>
  2367. <td><font size="-1">const string &amp;label_</font></td>
  2368. <td><font size="-1">Image label</font></td>
  2369. </tr>
  2370. <tr>
  2371. <td>
  2372. <center><a name="magick"></a> <font size="-1">magick</font></center>
  2373. </td>
  2374. <td><font size="-1">string</font></td>
  2375. <td><font size="-1">void</font></td>
  2376. <td><font size="-1">&#160;const string &amp;magick_</font></td>
  2377. <td><font size="-1">Get image format (e.g. "GIF")</font></td>
  2378. </tr>
  2379. <tr>
  2380. <td>
  2381. <center><a name="matte"></a> <font size="-1">matte</font></center>
  2382. </td>
  2383. <td><font size="-1">bool</font></td>
  2384. <td><font size="-1">void</font></td>
  2385. <td><font size="-1">bool matteFlag_</font></td>
  2386. <td><font size="-1">True if the image has transparency. If set
  2387. True, store matte channel if&#160; the image has one otherwise create
  2388. an opaque one.</font></td>
  2389. </tr>
  2390. <tr>
  2391. <td>
  2392. <center><a name="matteColor"></a> <font size="-1">matteColor</font></center>
  2393. </td>
  2394. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Color.html">Color</a> </font></td>
  2395. <td><font size="-1">void</font></td>
  2396. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Color.html">Color</a>
  2397. &amp;matteColor_</font></td>
  2398. <td><font size="-1">Image matte (frame) color</font></td>
  2399. </tr>
  2400. <tr>
  2401. <td>
  2402. <center><a name="meanErrorPerPixel"></a> <font size="-1">meanError-</font>
  2403. <br />
  2404. <font size="-1">PerPixel</font></center>
  2405. </td>
  2406. <td><font size="-1">double</font></td>
  2407. <td><font size="-1">void</font></td>
  2408. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  2409. <td><font size="-1">The mean error per pixel computed when an
  2410. image is color reduced. This parameter is only valid if verbose is set
  2411. to true and the image has just been quantized.</font></td>
  2412. </tr>
  2413. <tr>
  2414. <td style="text-align: center; vertical-align: middle;"><font
  2415. size="-1"><a name="modulusDepth"></a>modulusDepth<br />
  2416. </font></td>
  2417. <td style="text-align: left; vertical-align: middle;"><small>size_t
  2418. <br />
  2419. </small></td>
  2420. <td style="text-align: left; vertical-align: middle;"><small><font
  2421. size="-1"><small>void<br />
  2422. </small></font></small></td>
  2423. <td style="text-align: left; vertical-align: middle;"><small>size_t
  2424. depth_<br />
  2425. </small></td>
  2426. <td style="text-align: left; vertical-align: middle;"><small>Image
  2427. modulus depth (minimum number of bits required to support
  2428. red/green/blue components without loss of accuracy). The pixel modulus
  2429. depth may be decreased by supplying a value which is less than the
  2430. current value, updating the pixels (reducing accuracy) to the new
  2431. depth.
  2432. The pixel modulus depth can not be increased over the current value
  2433. using this method.<br />
  2434. </small></td>
  2435. </tr>
  2436. <tr>
  2437. <td>
  2438. <center><a name="monochrome"></a> <font size="-1">monochrome</font></center>
  2439. </td>
  2440. <td><font size="-1">bool</font></td>
  2441. <td><font size="-1">void</font></td>
  2442. <td><font size="-1">bool flag_</font></td>
  2443. <td><font size="-1">Transform the image to black and white</font></td>
  2444. </tr>
  2445. <tr>
  2446. <td>
  2447. <center><a name="montageGeometry"></a> <font size="-1">montage-</font>
  2448. <br />
  2449. <font size="-1">Geometry</font></center>
  2450. </td>
  2451. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a> </font></td>
  2452. <td><font size="-1">void</font></td>
  2453. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  2454. <td><font size="-1">Tile size and offset within an image montage.
  2455. Only valid for montage images.</font></td>
  2456. </tr>
  2457. <tr>
  2458. <td>
  2459. <center><a name="normalizedMaxError"></a> <font size="-1">normalized-</font>
  2460. <br />
  2461. <font size="-1">MaxError</font></center>
  2462. </td>
  2463. <td><font size="-1">double</font></td>
  2464. <td><font size="-1">void</font></td>
  2465. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  2466. <td><font size="-1">The normalized max error per pixel computed
  2467. when an image is color reduced. This parameter is only valid if verbose
  2468. is set to true and the image has just been quantized.</font></td>
  2469. </tr>
  2470. <tr>
  2471. <td>
  2472. <center><a name="normalizedMeanError"></a> <font size="-1">normalized-</font>
  2473. <br />
  2474. <font size="-1">MeanError</font></center>
  2475. </td>
  2476. <td><font size="-1">double</font></td>
  2477. <td><font size="-1">void</font></td>
  2478. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  2479. <td><font size="-1">The normalized mean error per pixel computed
  2480. when an image is color reduced. This parameter is only valid if verbose
  2481. is set to true and the image has just been quantized.</font></td>
  2482. </tr>
  2483. <tr>
  2484. <td style="text-align: center; vertical-align: middle;"><small><a
  2485. name="orientation"></a>orientation<br />
  2486. </small></td>
  2487. <td style="vertical-align: middle;"><small><a
  2488. href="https://imagemagick.org/Magick++/Enumerations.html#OrientationType">OrientationType</a></small></td>
  2489. <td style="vertical-align: top;"><small>void</small><br />
  2490. </td>
  2491. <td style="vertical-align: middle;"><small><a
  2492. href="https://imagemagick.org/Magick++/Enumerations.html#OrientationType">OrientationType</a>
  2493. orientation_</small></td>
  2494. <td style="vertical-align: top;"><small>Image orientation.
  2495. &#160;Supported by some file formats such as DPX and TIFF. Useful for
  2496. turning the right way up.<br />
  2497. </small></td>
  2498. </tr>
  2499. <tr>
  2500. <td>
  2501. <center><a name="packets"></a> <font size="-1">packets</font></center>
  2502. </td>
  2503. <td><font size="-1">size_t</font></td>
  2504. <td><font size="-1">void</font></td>
  2505. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  2506. <td><font size="-1">The number of runlength-encoded packets in</font>
  2507. <br />
  2508. <font size="-1">the image</font></td>
  2509. </tr>
  2510. <tr>
  2511. <td>
  2512. <center><a name="packetSize"></a> <font size="-1">packetSize</font></center>
  2513. </td>
  2514. <td><font size="-1">size_t</font></td>
  2515. <td><font size="-1">void</font></td>
  2516. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  2517. <td><font size="-1">The number of bytes in each pixel packet</font></td>
  2518. </tr>
  2519. <tr>
  2520. <td>
  2521. <center><a name="page"></a> <font size="-1">page</font></center>
  2522. </td>
  2523. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Geometry.html#PostscriptPageSize">Geometry</a>
  2524. </font></td>
  2525. <td><font size="-1">void</font></td>
  2526. <td><font size="-1">const <a
  2527. href="https://imagemagick.org/Magick++/Geometry.html#PostscriptPageSize"> Geometry</a> &amp;pageSize_</font></td>
  2528. <td><font size="-1">Preferred size and location of an image
  2529. canvas.</font>
  2530. <p><font size="-1">Use this option to specify the dimensions
  2531. and position of the Postscript page in dots per inch or a TEXT page in
  2532. pixels. This option is typically used in concert with <i><a
  2533. href="Image.html#density"> density</a> </i>.</font> </p>
  2534. <p><font size="-1">Page may also be used to position a GIF
  2535. image (such as for a scene in an animation)</font></p>
  2536. </td>
  2537. </tr>
  2538. <tr>
  2539. <td>
  2540. <center><a name="pixelColor"></a> <font size="-1">pixelColor</font></center>
  2541. </td>
  2542. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Color.html">Color</a> </font></td>
  2543. <td><font size="-1">ssize_t x_, ssize_t y_</font></td>
  2544. <td><font size="-1">ssize_t x_, ssize_t y_, const <a
  2545. href="https://imagemagick.org/Magick++/Color.html"> Color</a> &amp;color_</font></td>
  2546. <td><font size="-1">Get/set pixel color at location x &amp; y.</font></td>
  2547. </tr>
  2548. <tr>
  2549. <td valign="top">
  2550. <div style="text-align:center"><a name="profile"></a> <small>profile</small><br />
  2551. </div>
  2552. </td>
  2553. <td valign="top"><a href="https://imagemagick.org/Magick++/Blob.html"><small> Blob</small><small><br />
  2554. </small></a> </td>
  2555. <td valign="top"><small>const std::string name_</small><small><br />
  2556. </small></td>
  2557. <td valign="top"><small>const std::string name_, const Blob
  2558. &amp;colorProfile_</small><small><br />
  2559. </small></td>
  2560. <td valign="top"><small>Get/set/remove </small><small> a named
  2561. profile</small><small>. Valid names include </small><small>"*",
  2562. "8BIM", "ICM", "IPTC", or a user/format-defined profile name. </small><br />
  2563. </td>
  2564. </tr>
  2565. <tr>
  2566. <td>
  2567. <center><a name="quality"></a> <font size="-1">quality</font></center>
  2568. </td>
  2569. <td><font size="-1">size_t (0 to 100)</font></td>
  2570. <td><font size="-1">void</font></td>
  2571. <td><font size="-1">size_t quality_</font></td>
  2572. <td><font size="-1">JPEG/MIFF/PNG compression level (default 75).</font></td>
  2573. </tr>
  2574. <tr>
  2575. <td>
  2576. <center><a name="quantizeColors"></a> <font size="-1">quantize-</font>
  2577. <br />
  2578. <font size="-1">Colors</font></center>
  2579. </td>
  2580. <td><font size="-1">size_t</font></td>
  2581. <td><font size="-1">void</font></td>
  2582. <td><font size="-1">size_t colors_</font></td>
  2583. <td><font size="-1">Preferred number of colors in the image. The
  2584. actual number of colors in the image may be less than your request, but
  2585. never more. Images with less unique colors than specified with this
  2586. option will have any duplicate or unused colors removed.</font></td>
  2587. </tr>
  2588. <tr>
  2589. <td>
  2590. <center><a name="quantizeColorSpace"></a> <font size="-1">quantize-</font>
  2591. <br />
  2592. <font size="-1">ColorSpace</font></center>
  2593. </td>
  2594. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Enumerations.html#ColorspaceType">ColorspaceType</a>
  2595. </font></td>
  2596. <td><font size="-1">void</font></td>
  2597. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Enumerations.html#ColorspaceType">ColorspaceType</a>
  2598. colorSpace_</font></td>
  2599. <td><font size="-1">Colorspace to quantize colors in (default
  2600. RGB). Empirical evidence suggests that distances in color spaces such
  2601. as YUV or YIQ correspond to perceptual color differences more closely
  2602. than do distances in RGB space. These color spaces may give better
  2603. results when color reducing an image.</font></td>
  2604. </tr>
  2605. <tr>
  2606. <td>
  2607. <center><a name="quantizeDither"></a> <font size="-1">quantize-</font>
  2608. <br />
  2609. <font size="-1">Dither</font></center>
  2610. </td>
  2611. <td><font size="-1">bool</font></td>
  2612. <td><font size="-1">void</font></td>
  2613. <td><font size="-1">bool flag_</font></td>
  2614. <td><font size="-1">Apply Floyd/Steinberg error diffusion to the
  2615. image. The basic strategy of dithering is to&#160; trade&#160;
  2616. intensity
  2617. resolution&#160; for&#160; spatial&#160; resolution&#160; by&#160;
  2618. averaging the intensities&#160; of&#160; several&#160;
  2619. neighboring&#160; pixels. Images which&#160; suffer&#160; from&#160;
  2620. severe&#160; contouring&#160; when&#160; reducing colors can be
  2621. improved with this option. The quantizeColors or monochrome option must
  2622. be set for this option to take effect.</font></td>
  2623. </tr>
  2624. <tr>
  2625. <td>
  2626. <center><a name="quantizeTreeDepth"></a> <font size="-1">quantize-</font>
  2627. <br />
  2628. <font size="-1">TreeDepth</font></center>
  2629. </td>
  2630. <td><font size="-1">size_t&#160;</font></td>
  2631. <td><font size="-1">void</font></td>
  2632. <td><font size="-1">size_t treeDepth_</font></td>
  2633. <td><font size="-1">Depth of the quantization color
  2634. classification tree. Values of 0 or 1 allow selection of the optimal
  2635. tree depth for the color reduction algorithm. Values between 2 and 8
  2636. may be used to manually adjust the tree depth.</font></td>
  2637. </tr>
  2638. <tr>
  2639. <td>
  2640. <center><a name="renderingIntent"></a> <font size="-1">rendering-</font>
  2641. <br />
  2642. <font size="-1">Intent</font></center>
  2643. </td>
  2644. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Enumerations.html#RenderingIntent">RenderingIntent</a>
  2645. </font></td>
  2646. <td><font size="-1">void</font></td>
  2647. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Enumerations.html#RenderingIntent">RenderingIntent</a>
  2648. render_</font></td>
  2649. <td><font size="-1">The type of rendering intent</font></td>
  2650. </tr>
  2651. <tr>
  2652. <td>
  2653. <center><a name="resolutionUnits"></a> <font size="-1">resolution-</font>
  2654. <br />
  2655. <font size="-1">Units</font></center>
  2656. </td>
  2657. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Enumerations.html#ResolutionType">ResolutionType</a>
  2658. </font></td>
  2659. <td><font size="-1">void</font></td>
  2660. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Enumerations.html#ResolutionType">ResolutionType</a>
  2661. units_</font></td>
  2662. <td><font size="-1">Units of image resolution</font></td>
  2663. </tr>
  2664. <tr>
  2665. <td>
  2666. <center><a name="rows"></a> <font size="-1">rows</font></center>
  2667. </td>
  2668. <td><font size="-1">size_t</font></td>
  2669. <td><font size="-1">void</font></td>
  2670. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  2671. <td><font size="-1">The number of pixel rows in the image</font></td>
  2672. </tr>
  2673. <tr>
  2674. <td>
  2675. <center><a name="scene"></a> <font size="-1">scene</font></center>
  2676. </td>
  2677. <td><font size="-1">size_t</font></td>
  2678. <td><font size="-1">void</font></td>
  2679. <td><font size="-1">size_t scene_</font></td>
  2680. <td><font size="-1">Image scene number</font></td>
  2681. </tr>
  2682. <tr>
  2683. <td>
  2684. <center><a name="signature"></a> <font size="-1">signature</font></center>
  2685. </td>
  2686. <td><font size="-1">string</font></td>
  2687. <td><font size="-1">bool force_ = false</font></td>
  2688. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  2689. <td><font size="-1">Image MD5 signature. Set force_ to 'true' to
  2690. force re-computation of signature.</font></td>
  2691. </tr>
  2692. <tr>
  2693. <td>
  2694. <center><a name="size"></a> <font size="-1">size</font></center>
  2695. </td>
  2696. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a> </font></td>
  2697. <td><font size="-1">void</font></td>
  2698. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/Geometry.html">Geometry</a>
  2699. &amp;geometry_</font></td>
  2700. <td><font size="-1">Width and height of a raw image (an image
  2701. which does not support width and height information).&#160; Size may
  2702. also be used to affect the image size read from a multi-resolution
  2703. format (e.g. Photo CD, JBIG, or JPEG.</font></td>
  2704. </tr>
  2705. <tr>
  2706. <td style="text-align: center;">
  2707. <center><a name="strip"></a> <font size="-1">strip</font></center>
  2708. </td>
  2709. <td><font size="-1">void</font></td>
  2710. <td><font size="-1">strips an image of all profiles and comments.</font></td>
  2711. </tr>
  2712. <tr>
  2713. <td>
  2714. <center><a name="strokeAntiAlias"></a> <font size="-1">strokeAntiAlias</font></center>
  2715. </td>
  2716. <td><font size="-1">bool</font></td>
  2717. <td><font size="-1">void</font></td>
  2718. <td><font size="-1">bool flag_</font></td>
  2719. <td><font size="-1">Enable or disable anti-aliasing when drawing
  2720. object outlines.</font></td>
  2721. </tr>
  2722. <tr>
  2723. <td>
  2724. <center><a name="strokeColor"></a> <font size="-1">strokeColor</font></center>
  2725. </td>
  2726. <td><font size="-1">Color</font></td>
  2727. <td><font size="-1">void</font></td>
  2728. <td><font size="-1">const Color &amp;strokeColor_</font></td>
  2729. <td><font size="-1">Color to use when drawing object outlines</font></td>
  2730. </tr>
  2731. <tr>
  2732. <td>
  2733. <center><a name="strokeDashOffset"></a> <font size="-1">strokeDashOffset</font></center>
  2734. </td>
  2735. <td><font size="-1">size_t</font></td>
  2736. <td><font size="-1">void</font></td>
  2737. <td><font size="-1">double strokeDashOffset_</font></td>
  2738. <td><font size="-1">While drawing using a dash pattern, specify
  2739. distance into the dash pattern to start the dash (default 0).</font></td>
  2740. </tr>
  2741. <tr>
  2742. <td>
  2743. <center><a name="strokeDashArray"></a> <font size="-1">strokeDashArray</font></center>
  2744. </td>
  2745. <td><font size="-1">const double*</font></td>
  2746. <td><font size="-1">void</font></td>
  2747. <td><font size="-1">const double* strokeDashArray_</font></td>
  2748. <td><font size="-1">Specify the pattern of dashes and gaps used
  2749. to stroke paths. The strokeDashArray represents a zero-terminated
  2750. array of numbers that specify the lengths (in pixels) of alternating
  2751. dashes and gaps in user units. If an odd number of values is provided,
  2752. then the list of values is repeated to yield an even number of
  2753. values.&#160; A typical strokeDashArray_ array might contain the
  2754. members 5 3 2 0, where the zero value indicates the end of the pattern
  2755. array.</font></td>
  2756. </tr>
  2757. <tr>
  2758. <td>
  2759. <center><a name="strokeLineCap"></a> <font size="-1">strokeLineCap</font></center>
  2760. </td>
  2761. <td><font size="-1">LineCap</font></td>
  2762. <td><font size="-1">void</font></td>
  2763. <td><font size="-1">LineCap lineCap_</font></td>
  2764. <td><font size="-1">Specify the shape to be used at the corners
  2765. of paths (or other vector shapes) when they are stroked. Values of
  2766. LineJoin are UndefinedJoin, MiterJoin, RoundJoin, and BevelJoin.</font></td>
  2767. </tr>
  2768. <tr>
  2769. <td>
  2770. <center><a name="strokeLineJoin"></a> <font size="-1">strokeLineJoin</font></center>
  2771. </td>
  2772. <td><font size="-1">LineJoin</font></td>
  2773. <td><font size="-1">void</font></td>
  2774. <td><font size="-1">LineJoin lineJoin_</font></td>
  2775. <td><font size="-1">Specify the shape to be used at the corners
  2776. of paths (or other vector shapes) when they are stroked. Values of
  2777. LineJoin are UndefinedJoin, MiterJoin, RoundJoin, and BevelJoin.</font></td>
  2778. </tr>
  2779. <tr>
  2780. <td>
  2781. <center><a name="strokeMiterLimit"></a> <font size="-1">strokeMiterLimit</font></center>
  2782. </td>
  2783. <td><font size="-1">size_t</font></td>
  2784. <td><font size="-1">void</font></td>
  2785. <td><font size="-1">size_t miterLimit_</font></td>
  2786. <td><font size="-1">Specify miter limit. When two line segments
  2787. meet at a sharp angle and miter joins have been specified for
  2788. 'lineJoin', it is possible for the miter to extend far beyond the
  2789. thickness of the line stroking the path. The miterLimit' imposes a
  2790. limit on the ratio of the miter length to the 'lineWidth'. The default
  2791. value of this parameter is 4.</font></td>
  2792. </tr>
  2793. <tr>
  2794. <td>
  2795. <center><a name="strokeWidth"></a> <font size="-1">strokeWidth</font></center>
  2796. </td>
  2797. <td><font size="-1">double</font></td>
  2798. <td><font size="-1">void</font></td>
  2799. <td><font size="-1">double strokeWidth_</font></td>
  2800. <td><font size="-1">Stroke width for use when drawing vector
  2801. objects (default one)</font></td>
  2802. </tr>
  2803. <tr>
  2804. <td>
  2805. <center><a name="strokePattern"></a> <font size="-1">strokePattern</font></center>
  2806. </td>
  2807. <td><font size="-1">Image</font></td>
  2808. <td><font size="-1">void</font></td>
  2809. <td><font size="-1">const Image &amp;strokePattern_</font></td>
  2810. <td><font size="-1">Pattern image to use while drawing object
  2811. stroke (outlines).</font></td>
  2812. </tr>
  2813. <tr>
  2814. <td>
  2815. <center><a name="subImage"></a> <font size="-1">subImage</font></center>
  2816. </td>
  2817. <td><font size="-1">size_t</font></td>
  2818. <td><font size="-1">void</font></td>
  2819. <td><font size="-1">size_t subImage_</font></td>
  2820. <td><font size="-1">Subimage of an image sequence</font></td>
  2821. </tr>
  2822. <tr>
  2823. <td>
  2824. <center><a name="subRange"></a> <font size="-1">subRange</font></center>
  2825. </td>
  2826. <td><font size="-1">size_t</font></td>
  2827. <td><font size="-1">void</font></td>
  2828. <td><font size="-1">size_t subRange_</font></td>
  2829. <td><font size="-1">Number of images relative to the base image</font></td>
  2830. </tr>
  2831. <tr>
  2832. <td valign="middle">
  2833. <div style="text-align:center"><a name="textEncoding"></a> <small>textEncoding</small><br />
  2834. </div>
  2835. </td>
  2836. <td valign="middle"><small>string</small><small><br />
  2837. </small></td>
  2838. <td valign="middle"><small>void</small><small><br />
  2839. </small></td>
  2840. <td valign="middle"><small>const std::string &amp;encoding_</small><small><br />
  2841. </small></td>
  2842. <td valign="top"><small>Specify the code set to use for text
  2843. annotations. The only character encoding which may be specified at
  2844. this time is "UTF-8" for representing </small><small><a
  2845. href="http://www.unicode.org/"> Unicode </a> </small><small>as a
  2846. sequence of bytes. Specify an empty string to use the default ASCII
  2847. encoding. Successful text annotation using Unicode may require fonts
  2848. designed to support Unicode.</small><br />
  2849. </td>
  2850. </tr>
  2851. <tr>
  2852. <td>
  2853. <center><a name="tileName"></a> <font size="-1">tileName</font></center>
  2854. </td>
  2855. <td><font size="-1">string</font></td>
  2856. <td><font size="-1">void</font></td>
  2857. <td><font size="-1">const string &amp;tileName_</font></td>
  2858. <td><font size="-1">Tile name</font></td>
  2859. </tr>
  2860. <tr>
  2861. <td>
  2862. <center><a name="totalColors"></a> <font size="-1">totalColors</font></center>
  2863. </td>
  2864. <td><font size="-1">size_t</font></td>
  2865. <td><font size="-1">void</font></td>
  2866. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  2867. <td><font size="-1">Number of colors in the image</font></td>
  2868. </tr>
  2869. <tr>
  2870. <td>
  2871. <center><a name="type"></a> <font size="-1">type</font></center>
  2872. </td>
  2873. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Enumerations.html#ImageType">ImageType</a>
  2874. </font></td>
  2875. <td><font size="-1">void</font></td>
  2876. <td bgcolor="#ffffff"><font size="-1"><a
  2877. href="https://imagemagick.org/Magick++/Enumerations.html#ImageType"> ImageType</a> </font></td>
  2878. <td><font size="-1">Image type.</font></td>
  2879. </tr>
  2880. <tr>
  2881. <td>
  2882. <center><a name="verbose"></a> <font size="-1">verbose</font></center>
  2883. </td>
  2884. <td><font size="-1">bool</font></td>
  2885. <td><font size="-1">void</font></td>
  2886. <td><font size="-1">bool verboseFlag_</font></td>
  2887. <td><font size="-1">Print detailed information about the image</font></td>
  2888. </tr>
  2889. <tr>
  2890. <td>
  2891. <center><a name="view"></a> <font size="-1">view</font></center>
  2892. </td>
  2893. <td><font size="-1">string</font></td>
  2894. <td><font size="-1">void</font></td>
  2895. <td><font size="-1">const string &amp;view_</font></td>
  2896. <td><font size="-1">FlashPix viewing parameters.</font></td>
  2897. </tr>
  2898. <tr>
  2899. <td>
  2900. <center><a name="virtualPixelMethod"></a> <font size="-1">virtualPixelMethod</font></center>
  2901. </td>
  2902. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Enumerations.html#VirtualPixelMethod">VirtualPixelMethod</a>
  2903. </font></td>
  2904. <td><small><font size="-1"><small>void</small></font></small></td>
  2905. <td><small><font size="-1"><small><a
  2906. href="https://imagemagick.org/Magick++/Enumerations.html#VirtualPixelMethod">VirtualPixelMethod</a>
  2907. virtualPixelMethod_</small></font></small></td>
  2908. <td><font size="-1">Image virtual pixel method.</font></td>
  2909. </tr>
  2910. <tr>
  2911. <td>
  2912. <center><a name="x11Display"></a> <font size="-1">x11Display</font></center>
  2913. </td>
  2914. <td><font size="-1">string (e.g. "hostname:0.0")</font></td>
  2915. <td><font size="-1">void</font></td>
  2916. <td><font size="-1">const string &amp;display_</font></td>
  2917. <td><font size="-1">X11 display to display to, obtain fonts from,
  2918. or to capture image from</font></td>
  2919. </tr>
  2920. <tr>
  2921. <td>
  2922. <center><a name="xResolution"></a> <font size="-1">xResolution</font></center>
  2923. </td>
  2924. <td><font size="-1">double</font></td>
  2925. <td><font size="-1">void</font></td>
  2926. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  2927. <td><font size="-1">x resolution of the image</font></td>
  2928. </tr>
  2929. <tr>
  2930. <td>
  2931. <center><a name="yResolution"></a> <font size="-1">yResolution</font></center>
  2932. </td>
  2933. <td><font size="-1">double</font></td>
  2934. <td><font size="-1">void</font></td>
  2935. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  2936. <td><font size="-1">y resolution of the image</font></td>
  2937. </tr>
  2938. </tbody>
  2939. </table>
  2940. <center>
  2941. <h3> <a name="Raw Image Pixel Access"></a> Low-Level Image Pixel Access</h3>
  2942. </center>
  2943. Image pixels (of type <i><a href="https://imagemagick.org/Magick++/PixelPacket.html">PixelPacket</a> </i>)
  2944. may be accessed directly via the <i>Image Pixel Cache</i> .&#160; The
  2945. image pixel cache is a rectangular window into the actual image pixels
  2946. (which may be in memory, memory-mapped from a disk file, or entirely on
  2947. disk). Two interfaces exist to access the <i>Image Pixel Cache.</i>
  2948. The
  2949. interface described here (part of the <i>Image</i> class) supports
  2950. only
  2951. one view at a time. See the <i><a href="https://imagemagick.org/Magick++/Pixels.html">Pixels</a> </i>
  2952. class for a more abstract interface which supports simultaneous pixel
  2953. views (up to the number of rows). As an analogy, the interface
  2954. described
  2955. here relates to the <i><a href="https://imagemagick.org/Magick++/Pixels.html">Pixels</a> </i> class as
  2956. stdio's gets() relates to fgets(). The <i><a href="https://imagemagick.org/Magick++/Pixels.html"> Pixels</a>
  2957. </i>class provides the more general form of the interface.
  2958. <p>Obtain existing image pixels via <i>getPixels()</i>. Create a new
  2959. pixel region using <i>setPixels().</i></p>
  2960. <p>In order to ensure that only the current generation of the image is
  2961. modified, the Image's <a href="Image.html#modifyImage">modifyImage()</a> method
  2962. should be invoked to reduce the reference count on the underlying image
  2963. to one. If this is not done, then it is possible for a previous
  2964. generation of the image to be modified due to the use of reference
  2965. counting when copying or constructing an Image.<br />
  2966. </p>
  2967. <p>Depending on the capabilities of the operating system, and the
  2968. relationship of the window to the image, the pixel cache may be a copy
  2969. of the pixels in the selected window, or it may be the actual image
  2970. pixels. In any case calling <i>syncPixels()</i> insures that the base
  2971. image is updated with the contents of the modified pixel cache. The
  2972. method <i> readPixels()</i> supports copying foreign pixel data
  2973. formats
  2974. into the pixel cache according to the <i>QuantumTypes</i>. The method <i>writePixels()</i>
  2975. supports copying the pixels in the cache to a foreign pixel
  2976. representation according to the format specified by <i>QuantumTypes</i>.</p>
  2977. <p>The pixel region is effectively a small image in which the pixels
  2978. may be accessed, addressed, and updated, as shown in the following
  2979. example:</p>
  2980. <pre class="code">
  2981. <img class="icon" src="https://imagemagick.org/Magick++/Cache.png" name="Graphic1" width="254" border="0" alt="cache" />
  2982. Image image("cow.png");
  2983. // Ensure that there are no other references to this image.
  2984. image.modifyImage();
  2985. // Set the image type to TrueColor DirectClass representation.
  2986. image.type(TrueColorType);
  2987. // Request pixel region with size 60x40, and top origin at 20x30
  2988. ssize_t columns = 60;
  2989. PixelPacket *pixel_cache = image.getPixels(20,30,columns,40);
  2990. // Set pixel at column 5, and row 10 in the pixel cache to red.
  2991. ssize_t column = 5;
  2992. ssize_t row = 10;
  2993. PixelPacket *pixel = pixel_cache+row*columns+column;
  2994. *pixel = Color("red");
  2995. // Save changes to underlying image .
  2996. image.syncPixels();
  2997. // Save updated image to file.
  2998. image.write("horse.png");
  2999. </pre>
  3000. <p>The image cache supports the following methods: <br />
  3001. &#160;</p>
  3002. <table border="1" width="100%">
  3003. <caption>Image Cache Methods</caption> <tbody>
  3004. <tr>
  3005. <td>
  3006. <center><b>Method</b></center>
  3007. </td>
  3008. <td>
  3009. <center><b>Returns</b></center>
  3010. </td>
  3011. <td>
  3012. <center><b>Signature</b></center>
  3013. </td>
  3014. <td>
  3015. <center><b>Description</b></center>
  3016. </td>
  3017. </tr>
  3018. <tr>
  3019. <td>
  3020. <center><a name="getConstPixels"></a> <font size="-1">getConstPixels</font></center>
  3021. </td>
  3022. <td><font size="-1">const <a href="https://imagemagick.org/Magick++/PixelPacket.html">PixelPacket</a>
  3023. *</font></td>
  3024. <td><font size="-1">const ssize_t x_, const ssize_t y_, const size_t
  3025. columns_, const size_t rows_</font></td>
  3026. <td><font size="-1">Transfers pixels from the image to the pixel
  3027. cache as defined by the specified rectangular region.&#160;</font><font
  3028. size="-1">The returned pointer remains valid until the next getPixel,
  3029. getConstPixels, or setPixels call and should never be deallocated by
  3030. the
  3031. user.</font></td>
  3032. </tr>
  3033. <tr>
  3034. <td>
  3035. <center><a name="getConstIndexes"></a> <font size="-1">getConstIndexes</font></center>
  3036. </td>
  3037. <td><font size="-1">const IndexPacket*</font></td>
  3038. <td><font size="-1">void</font></td>
  3039. <td><font size="-1">Returns a pointer to the Image pixel indexes
  3040. corresponding to a previous </font><font size="-1">getPixel,
  3041. getConstPixels, or setPixels call. &#160;</font><font size="-1">The
  3042. returned pointer remains valid until the next getPixel, getConstPixels,
  3043. or setPixels call and should never be deallocated by the user.</font><font
  3044. size="-1"> Only valid for PseudoClass images or CMYKA images. The
  3045. pixel indexes represent an array of type IndexPacket, with each entry
  3046. corresponding to an x,y pixel position. For PseudoClass images, the
  3047. entry's value is the offset into the colormap (see <a href="Image.html#colorMap">colorMap</a>
  3048. ) for that pixel. For CMYKA images, the indexes are used to contain the
  3049. alpha channel.</font></td>
  3050. </tr>
  3051. <tr>
  3052. <td>
  3053. <center><a name="getIndexes"></a> <font size="-1">getIndexes</font></center>
  3054. </td>
  3055. <td><font size="-1">IndexPacket*</font></td>
  3056. <td><font size="-1">void</font></td>
  3057. <td><font size="-1">Returns a pointer to the Image pixel indexes
  3058. corresponding to the pixel region requested by the last <a
  3059. href="Image.html#getConstPixels">getConstPixels</a> , <a href="Image.html#getPixels">getPixels</a>
  3060. , or <a href="Image.html#setPixels">setPixels</a> call. </font><font
  3061. size="-1">The
  3062. returned pointer remains valid until the next getPixel, getConstPixels,
  3063. or setPixels call and should never be deallocated by the user.</font><font
  3064. size="-1"> </font><font size="-1">Only valid for PseudoClass images
  3065. or
  3066. CMYKA images. The pixel indexes represent an array of type
  3067. IndexPacket, with each entry corresponding to a pixel x,y position. For
  3068. PseudoClass images, the entry's value is the offset into the colormap
  3069. (see <a href="Image.html#colorMap">colorMap</a> ) for that pixel. For
  3070. CMYKA
  3071. images, the indexes are used to contain the alpha channel.</font></td>
  3072. </tr>
  3073. <tr>
  3074. <td>
  3075. <center><a name="getPixels"></a> <font size="-1">getPixels</font></center>
  3076. </td>
  3077. <td><font size="-1"><a href="https://imagemagick.org/Magick++/PixelPacket.html">PixelPacket</a> *</font></td>
  3078. <td><font size="-1">const ssize_t x_, const ssize_t y_, const size_t
  3079. columns_, const size_t rows_</font></td>
  3080. <td><font size="-1">Transfers pixels from the image to the pixel
  3081. cache as defined by the specified rectangular region. Modified pixels
  3082. may be subsequently transferred back to the image via syncPixels. </font><font
  3083. size="-1">The returned pointer remains valid until the next getPixel,
  3084. getConstPixels, or setPixels call and should never be deallocated by
  3085. the
  3086. user.</font><font size="-1"></font></td>
  3087. </tr>
  3088. <tr>
  3089. <td>
  3090. <center><a name="setPixels"></a> <font size="-1">setPixels</font></center>
  3091. </td>
  3092. <td><font size="-1"><a href="https://imagemagick.org/Magick++/PixelPacket.html">PixelPacket</a> *</font></td>
  3093. <td><font size="-1">const ssize_t x_, const ssize_t y_, const size_t
  3094. columns_, const size_t rows_</font></td>
  3095. <td><font size="-1">Allocates a pixel cache region to store image
  3096. pixels as defined by the region rectangle.&#160; This area is
  3097. subsequently transferred from the pixel cache to the image via
  3098. syncPixels.&#160;</font><font size="-1">The returned pointer remains
  3099. valid until the next getPixel, getConstPixels, or setPixels call and
  3100. should never be deallocated by the user.</font></td>
  3101. </tr>
  3102. <tr>
  3103. <td>
  3104. <center><a name="syncPixels"></a> <font size="-1">syncPixels</font></center>
  3105. </td>
  3106. <td><font size="-1">void</font></td>
  3107. <td><font size="-1">void</font></td>
  3108. <td><font size="-1">Transfers the image cache pixels to the image.</font></td>
  3109. </tr>
  3110. <tr>
  3111. <td>
  3112. <center><a name="readPixels"></a> <font size="-1">readPixels</font></center>
  3113. </td>
  3114. <td><font size="-1">void</font></td>
  3115. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Enumerations.html#QuantumTypes">QuantumTypes</a>
  3116. quantum_, unsigned char *source_,</font></td>
  3117. <td><font size="-1">Transfers one or more pixel components from a
  3118. buffer or file into the image pixel cache of an image. ReadPixels is
  3119. typically used to support image decoders. The region transferred
  3120. corresponds to the region set by a preceding setPixels call.</font></td>
  3121. </tr>
  3122. <tr>
  3123. <td>
  3124. <center><a name="writePixels"></a> <font size="-1">writePixels</font></center>
  3125. </td>
  3126. <td><font size="-1">void</font></td>
  3127. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Enumerations.html#QuantumTypes">QuantumTypes</a>
  3128. quantum_, unsigned char *destination_</font></td>
  3129. <td><font size="-1">Transfers one or more pixel components from
  3130. the image pixel cache to a buffer or file. WritePixels is typically
  3131. used to support image encoders. The region transferred corresponds to
  3132. the region set by a preceding getPixels or getConstPixels call.</font></td>
  3133. </tr>
  3134. </tbody>
  3135. </table>
  3136. </div>
  3137. </body>
  3138. </html>