Image++.html 220 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534
  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>
  19. <a href="Image++.html#Image%20Manipulation%20Methods">
  20. Image Manipulation
  21. Methods
  22. </a>
  23. </li>
  24. <li> <a href="Image++.html#Image%20Attributes">Image Attributes</a> </li>
  25. <li>
  26. <a href="Image++.html#Raw%20Image%20Pixel%20Access">
  27. Low-Level Image Pixel
  28. Access
  29. </a>
  30. </li>
  31. </ul>
  32. <p>
  33. Image is the primary object in Magick++ and represents
  34. a single image frame (see <a href="https://imagemagick.org/Magick++/ImageDesign.html">design</a> ). The
  35. <a href="STL.html">STL interface</a> <b>must</b> be used to operate on
  36. image sequences or images (e.g. of format GIF, TIFF, MIFF, Postscript,
  37. &amp; MNG) which are comprized of multiple image frames. Individual
  38. frames of a multi-frame image may be requested by adding array-style
  39. notation to the end of the file name (e.g. "animation.gif[3]" retrieves
  40. the fourth frame of a GIF animation.&#160; Various image manipulation
  41. operations may be applied to the image. Attributes may be set on the
  42. image to influence the operation of the manipulation operations. The <a href="Pixels.html">Pixels</a> class provides low-level access to
  43. image
  44. pixels. As a convenience, including <tt><font color="#663366">&lt;Magick++.h&gt;</font></tt>
  45. is sufficient in order to use the complete Magick++ API. The Magick++
  46. API is enclosed within the <i>Magick</i> namespace so you must either
  47. add the prefix "<tt> Magick::</tt> " to each class/enumeration name or
  48. add
  49. the statement "<tt> using namespace Magick;</tt>" after including the <tt>Magick++.h</tt>
  50. header.
  51. </p>
  52. <p>
  53. The preferred way to allocate Image objects is via automatic
  54. allocation (on the stack). There is no concern that allocating Image
  55. objects on the stack will excessively enlarge the stack since Magick++
  56. allocates all large data objects (such as the actual image data) from
  57. the heap. Use of automatic allocation is preferred over explicit
  58. allocation (via <i>new</i>) since it is much less error prone and
  59. allows use of C++ scoping rules to avoid memory leaks. Use of automatic
  60. allocation allows Magick++ objects to be assigned and copied just like
  61. the C++ intrinsic data types (e.g. '<i>int</i> '), leading to clear and
  62. easy to read code. Use of automatic allocation leads to naturally
  63. exception-safe code since if an exception is thrown, the object is
  64. automagically deallocated once the stack unwinds past the scope of the
  65. allocation (not the case for objects allocated via <i>new</i> ).
  66. </p>
  67. <p>
  68. Image is very easy to use. For example, here is a the source to a
  69. program which reads an image, crops it, and writes it to a new file
  70. (the
  71. exception handling is optional but strongly recommended):
  72. </p>
  73. <pre class="code">
  74. #include &lt;Magick++.h>
  75. #include &lt;iostream>
  76. using namespace std;
  77. using namespace Magick;
  78. int main(int argc,char **argv)
  79. {
  80. InitializeMagick(*argv);
  81. // Construct the image object. Seperating image construction from the
  82. // the read operation ensures that a failure to read the image file
  83. // doesn't render the image object useless.
  84. Image image;
  85. try {
  86. // Read a file into image object
  87. image.read( "girl.gif" );
  88. // Crop the image to specified size (width, height, xOffset, yOffset)
  89. image.crop( Geometry(100,100, 100, 100) );
  90. // Write the image to a file
  91. image.write( "x.gif" );
  92. }
  93. catch( Exception &amp;error_ )
  94. {
  95. cout &lt;&lt; "Caught exception: " &lt;&lt; error_.what() &lt;&lt; endl;
  96. return 1;
  97. }
  98. return 0;
  99. }
  100. </pre>
  101. The following is the source to a program which illustrates the use of
  102. Magick++'s efficient reference-counted assignment and copy-constructor
  103. operations which minimize use of memory and eliminate unncessary copy
  104. operations (allowing Image objects to be efficiently assigned, and
  105. copied into containers).&#160; The program accomplishes the
  106. following:
  107. <ol>
  108. <li> Read master image.</li>
  109. <li> Assign master image to second image.</li>
  110. <li> Resize second image to the size 640x480.</li>
  111. <li> Assign master image to a third image.</li>
  112. <li> Resize third image to the size 800x600.</li>
  113. <li> Write the second image to a file.</li>
  114. <li> Write the third image to a file.</li>
  115. </ol>
  116. <pre class="code">
  117. #include &lt;Magick++.h>
  118. #include &lt;iostream>
  119. using namespace std;
  120. using namespace Magick;
  121. int main(int argc,char **argv)
  122. {
  123. InitializeMagick(*argv);
  124. Image master("horse.jpg");
  125. Image second = master;
  126. second.resize("640x480");
  127. Image third = master;
  128. third.resize("800x600");
  129. second.write("horse640x480.jpg");
  130. third.write("horse800x600.jpg");
  131. return 0;
  132. }
  133. </pre>
  134. During the entire operation, a maximum of three images exist in memory
  135. and the image data is never copied.
  136. <p>
  137. The following is the source for another simple program which creates
  138. a 100 by 100 pixel white image with a red pixel in the center and
  139. writes it to a file:
  140. </p>
  141. <pre class="code">
  142. #include &lt;Magick++.h>
  143. using namespace std;
  144. using namespace Magick;
  145. int main(int argc,char **argv)
  146. {
  147. InitializeMagick(*argv);
  148. Image image( "100x100", "white" );
  149. image.pixelColor( 49, 49, "red" );
  150. image.write( "red_pixel.png" );
  151. return 0;
  152. }
  153. </pre>
  154. If you wanted to change the color image to grayscale, you could add the
  155. lines:
  156. <pre class="code">
  157. image.quantizeColorSpace( GRAYColorspace );
  158. image.quantizeColors( 256 );
  159. image.quantize( );
  160. </pre>
  161. <p>or, more simply: </p>
  162. <pre class="code">
  163. image.type( GrayscaleType );
  164. </pre>
  165. <p>prior to writing the image. </p>
  166. <center>
  167. <h3> <a name="BLOBs"></a> BLOBs</h3>
  168. </center>
  169. While encoded images (e.g. JPEG) are most often written-to and
  170. read-from a disk file, encoded images may also reside in memory.
  171. Encoded
  172. images in memory are known as BLOBs (Binary Large OBjects) and may be
  173. represented using the <a href="Blob.html">Blob</a> class. The encoded
  174. image may be initially placed in memory by reading it directly from a
  175. file, reading the image from a database, memory-mapped from a disk
  176. file, or could be written to memory by Magick++. Once the encoded image
  177. has been placed within a Blob, it may be read into a Magick++ Image via
  178. a <a href="Image++.html#constructor_blob">constructor</a> or <a href="Image++.html#read">read()</a>
  179. . Likewise, a Magick++ image may be written to a Blob via <a href="Image++.html#write">write()</a> .
  180. <p>
  181. An example of using Image to write to a Blob follows: <br />
  182. &#160;
  183. </p>
  184. <pre class="code">
  185. #include &gt;Magick++.h>
  186. using namespace std;
  187. using namespace Magick;
  188. int main(int argc,char **argv)
  189. {
  190. InitializeMagick(*argv);
  191. // Read GIF file from disk
  192. Image image( "giraffe.gif" );
  193. // Write to BLOB in JPEG format
  194. Blob blob;
  195. image.magick( "JPEG" ) // Set JPEG output format
  196. image.write( &amp;blob );
  197. [ Use BLOB data (in JPEG format) here ]
  198. return 0;
  199. }
  200. </pre>
  201. <p>
  202. <br />
  203. likewise, to read an image from a Blob, you could use one of the
  204. following examples:
  205. </p>
  206. <p>
  207. [ <font color="#000000">
  208. Entry condition for the following examples
  209. is that <i>data</i> is pointer to encoded image data and <i>length</i>
  210. represents the size of the data
  211. </font> ]
  212. </p>
  213. <pre class="code">
  214. Blob blob( data, length );
  215. Image image( blob );
  216. </pre>
  217. or
  218. <pre class="code">
  219. Blob blob( data, length );
  220. Image image;
  221. image.read( blob);
  222. </pre>
  223. some images do not contain their size or format so the size and format must be specified in advance:
  224. <pre class="code">
  225. Blob blob( data, length );
  226. Image image;
  227. image.size( "640x480")
  228. image.magick( "RGBA" );
  229. image.read( blob);
  230. </pre>
  231. <center>
  232. <h3> <a name="Constructors"></a> Constructors</h3>
  233. </center>
  234. Image may be constructed in a number of ways. It may be constructed
  235. from a file, a URL, or an encoded image (e.g. JPEG) contained in an
  236. in-memory <a href="Blob.html"> BLOB</a> . The available Image
  237. constructors are shown in the following table: <br />
  238. &#160; <br />
  239. &#160;
  240. <table bgcolor="#ffffff" border="1" width="100%">
  241. <caption><b>Image Constructors</b></caption>
  242. <tbody>
  243. <tr>
  244. <td>
  245. <center><b>Signature</b></center>
  246. </td>
  247. <td>
  248. <center><b>Description</b></center>
  249. </td>
  250. </tr>
  251. <tr>
  252. <td><font size="-1">const std::string &amp;imageSpec_</font></td>
  253. <td>
  254. <font size="-1">
  255. Construct Image by reading from file or URL
  256. specified by <i>imageSpec_</i>. Use array notation (e.g. filename[9])
  257. to select a specific scene from a multi-frame image.
  258. </font>
  259. </td>
  260. </tr>
  261. <tr>
  262. <td>
  263. <font size="-1">
  264. const Geometry &amp;size_, const <a href="Color.html">Color</a> &amp;color_
  265. </font>
  266. </td>
  267. <td>
  268. <font size="-1">
  269. Construct a blank image canvas of specified
  270. size and color
  271. </font>
  272. </td>
  273. </tr>
  274. <tr>
  275. <td>
  276. <a name="constructor_blob"></a> <font size="-1">
  277. const <a href="Blob.html">Blob</a> &amp;blob_
  278. </font>
  279. </td>
  280. <td rowspan="5">
  281. <font size="-1">
  282. Construct Image by reading from
  283. encoded image data contained in an in-memory <a href="Blob.html">BLOB</a>
  284. . Depending on the constructor arguments, the Blob <a href="Image++.html#size">size</a>
  285. , <a href="Image++.html#depth">depth</a> , <a href="Image++.html#magick">magick</a> (format)
  286. may
  287. also be specified. Some image formats require that size be specified.
  288. The default ImageMagick uses for depth depends on the compiled-in
  289. Quantum size (8 or 16).&#160; If ImageMagick's Quantum size does not
  290. match that of the image, the depth may need to be specified.
  291. ImageMagick can usually automagically detect the image's format.
  292. When a format can't be automagically detected, the format (<a href="Image++.html#magick">magick</a> ) must be specified.
  293. </font>
  294. </td>
  295. </tr>
  296. <tr>
  297. <td>
  298. <font size="-1">
  299. const <a href="Blob.html">Blob</a>
  300. &amp;blob_, const <a href="Geometry.html">Geometry</a> &amp;size_
  301. </font>
  302. </td>
  303. </tr>
  304. <tr>
  305. <td>
  306. <font size="-1">
  307. const <a href="Blob.html">Blob</a>
  308. &amp;blob_, const <a href="Geometry.html">Geometry</a> &amp;size,
  309. size_t depth
  310. </font>
  311. </td>
  312. </tr>
  313. <tr>
  314. <td>
  315. <font size="-1">
  316. const <a href="Blob.html">Blob</a>
  317. &amp;blob_, const <a href="Geometry.html">Geometry</a> &amp;size,
  318. size_t depth_, const string &amp;magick_
  319. </font>
  320. </td>
  321. </tr>
  322. <tr>
  323. <td>
  324. <font size="-1">
  325. const <a href="Blob.html">Blob</a>
  326. &amp;blob_, const <a href="Geometry.html">Geometry</a> &amp;size,
  327. const
  328. string &amp;magick_
  329. </font>
  330. </td>
  331. </tr>
  332. <tr>
  333. <td>
  334. <font size="-1">const size_t width_,&#160;</font> <br />
  335. <font size="-1">const size_t height_,</font> <br />
  336. <font size="-1">std::string map_,</font> <br />
  337. <font size="-1">
  338. const <a href="https://imagemagick.org/Magick++/Enumerations.html#StorageType">
  339. StorageType
  340. </a> type_,
  341. </font> <br />
  342. <font size="-1">const void *pixels_</font>
  343. </td>
  344. <td>
  345. <font size="-1">
  346. Construct a new Image based on an array of
  347. image pixels. The pixel data must be in scanline order top-to-bottom.
  348. The data can be character, short int, integer, float, or double. Float
  349. and double require the pixels to be normalized [0..1]. The other types
  350. are [0..MaxRGB].&#160; For example, to create a 640x480 image from
  351. unsigned red-green-blue character data, use
  352. </font>
  353. <p>
  354. <font size="-1">
  355. &#160;&#160; Image image( 640, 480, "RGB",
  356. 0, pixels );
  357. </font>
  358. </p>
  359. <p>
  360. <font size="-1">The parameters are as follows:</font> <br />
  361. &#160;
  362. </p>
  363. <table border="0" width="100%">
  364. <tbody>
  365. <tr>
  366. <td><font size="-1">width_</font></td>
  367. <td><font size="-1">Width in pixels of the image.</font></td>
  368. </tr>
  369. <tr>
  370. <td><font size="-1">height_</font></td>
  371. <td><font size="-1">Height in pixels of the image.</font></td>
  372. </tr>
  373. <tr>
  374. <td><font size="-1">map_</font></td>
  375. <td>
  376. <font size="-1">
  377. This character string can be any
  378. combination or order of R = red, G = green, B = blue, A = alpha, C =
  379. cyan, Y = yellow M = magenta, and K = black. The ordering reflects the
  380. order of the pixels in the supplied pixel array.
  381. </font>
  382. </td>
  383. </tr>
  384. <tr>
  385. <td><font size="-1">type_</font></td>
  386. <td>
  387. <font size="-1">
  388. <a href="https://imagemagick.org/Magick++/Enumerations.html#StorageType">
  389. Pixel
  390. storage type
  391. </a> (CharPixel, ShortPixel, IntegerPixel, FloatPixel, or
  392. DoublePixel)
  393. </font>
  394. </td>
  395. </tr>
  396. <tr>
  397. <td><font size="-1">pixels_</font></td>
  398. <td>
  399. <font size="-1">
  400. This array of values contain the pixel
  401. components as defined by the map_ and type_ parameters. The length of
  402. the arrays must equal the area specified by the width_ and height_
  403. values and type_ parameters.
  404. </font>
  405. </td>
  406. </tr>
  407. </tbody>
  408. </table>
  409. </td>
  410. </tr>
  411. </tbody>
  412. </table>
  413. <center>
  414. <h3>
  415. <a name="Image Manipulation Methods"></a> Image Manipulation
  416. Methods
  417. </h3>
  418. </center>
  419. <i>Image</i> supports access to all the single-image (versus
  420. image-list) manipulation operations provided by the ImageMagick
  421. library. If you
  422. must process a multi-image file (such as an animation), the <a href="STL.html">STL interface</a> , which provides a multi-image
  423. abstraction on top of <i>Image</i>, must be used.
  424. <p>Image manipulation methods are very easy to use.&#160; For example: </p>
  425. <pre class="code">
  426. Image image;
  427. image.read("myImage.tiff");
  428. image.addNoise(GaussianNoise);
  429. image.write("myImage.tiff");
  430. </pre>
  431. adds gaussian noise to the image file "myImage.tiff".
  432. <p>
  433. The operations supported by Image are shown in the following table: <br />
  434. &#160;
  435. </p>
  436. <table border="1">
  437. <caption><b>Image Image Manipulation Methods</b></caption>
  438. <tbody>
  439. <tr align="center">
  440. <td><b>Method</b></td>
  441. <td><b>Signature(s)</b></td>
  442. <td><b>Description</b></td>
  443. </tr>
  444. <tr>
  445. <td style="text-align: center;" valign="middle">
  446. <div style="text-align:center">
  447. <a name="adaptiveThreshold"></a> <font size="-1">
  448. adaptiveThreshold<br />
  449. </font>
  450. </div>
  451. </td>
  452. <td valign="middle">
  453. <font size="-1">
  454. size_t width, size_t
  455. height, size_t offset = 0<br />
  456. </font>
  457. </td>
  458. <td valign="top">
  459. <font size="-1">
  460. Apply adaptive thresholding to
  461. the image. Adaptive thresholding is useful if the ideal threshold level
  462. is not known in advance, or if the illumination gradient is not
  463. constant
  464. across the image. Adaptive thresholding works by evaulating the mean
  465. (average) of a pixel region (size specified by <i>width</i> and <i>height</i>)
  466. and using the mean as the thresholding value. In order to remove
  467. residual noise from the background, the threshold may be adjusted by
  468. subtracting a constant <i>offset</i> (default zero) from the mean to
  469. compute the threshold.
  470. </font><br />
  471. </td>
  472. </tr>
  473. <tr>
  474. <td style="text-align: center;">
  475. <center><a name="addNoise"></a> <font size="-1">addNoise</font></center>
  476. </td>
  477. <td>
  478. <font size="-1">
  479. <a href="https://imagemagick.org/Magick++/Enumerations.html#NoiseType">NoiseType</a>
  480. noiseType_
  481. </font>
  482. </td>
  483. <td><font size="-1">Add noise to image with specified noise type.</font></td>
  484. </tr>
  485. <tr>
  486. <td style="vertical-align: middle; text-align: center;">
  487. <small>
  488. <a name="addNoiseChannel"></a>addNoiseChannel<br />
  489. </small>
  490. </td>
  491. <td style="vertical-align: middle;">
  492. <small>
  493. const ChannelType
  494. channel_, const NoiseType noiseType_<br />
  495. </small>
  496. </td>
  497. <td style="vertical-align: middle;">
  498. <small>
  499. Add noise to an image
  500. channel with the specified noise type.
  501. </small><font size="-1">
  502. The <span style="font-style: italic;">channel_</span> parameter specifies the
  503. channel to add noise to.&#160; The
  504. </font><small>
  505. noiseType_ parameter
  506. specifies the type of noise.<br />
  507. </small>
  508. </td>
  509. </tr>
  510. <tr>
  511. <td style="vertical-align: middle; text-align: center;">
  512. <small>
  513. <a name="affineTransform"></a>affineTransform<br />
  514. </small>
  515. </td>
  516. <td style="vertical-align: middle;">
  517. <small>
  518. const DrawableAffine
  519. &amp;affine<br />
  520. </small>
  521. </td>
  522. <td style="vertical-align: middle;">
  523. <small>
  524. Transform image by
  525. specified affine (or free transform) matrix.<br />
  526. </small>
  527. </td>
  528. </tr>
  529. <tr>
  530. <td style="text-align: center;" rowspan="4">
  531. <center><a name="annotate"></a> <font size="-1">annotate</font></center>
  532. </td>
  533. <td>
  534. <font size="-1">
  535. const std::string &amp;text_, const <a href="Geometry.html">Geometry</a> &amp;location_
  536. </font>
  537. </td>
  538. <td>
  539. <font size="-1">
  540. Annotate using specified text, and placement
  541. location
  542. </font>
  543. </td>
  544. </tr>
  545. <tr>
  546. <td>
  547. <font size="-1">
  548. string text_, const <a href="Geometry.html">Geometry</a>
  549. &amp;boundingArea_, <a href="https://imagemagick.org/Magick++/Enumerations.html#GravityType">GravityType</a>
  550. gravity_
  551. </font>
  552. </td>
  553. <td>
  554. <font size="-1">
  555. Annotate using specified text, bounding area,
  556. and placement gravity. If <i>boundingArea_</i> is invalid, then
  557. bounding area is entire image.
  558. </font>
  559. </td>
  560. </tr>
  561. <tr>
  562. <td>
  563. <font size="-1">
  564. const std::string &amp;text_, const <a href="Geometry.html">Geometry</a> &amp;boundingArea_, <a href="https://imagemagick.org/Magick++/Enumerations.html#GravityType">GravityType</a> gravity_, double
  565. degrees_,&#160;
  566. </font>
  567. </td>
  568. <td>
  569. <font size="-1">
  570. Annotate with text using specified text,
  571. bounding area, placement gravity, and rotation. If <i>boundingArea_</i>
  572. is invalid, then bounding area is entire image.
  573. </font>
  574. </td>
  575. </tr>
  576. <tr>
  577. <td>
  578. <font size="-1">
  579. const std::string &amp;text_, <a href="https://imagemagick.org/Magick++/Enumerations.html#GravityType">GravityType</a> gravity_
  580. </font>
  581. </td>
  582. <td>
  583. <font size="-1">
  584. Annotate with text (bounding area is entire
  585. image) and placement gravity.
  586. </font>
  587. </td>
  588. </tr>
  589. <tr>
  590. <td style="text-align: center;">
  591. <center><a name="blur"></a> <font size="-1">blur</font></center>
  592. </td>
  593. <td>
  594. <font size="-1">
  595. const double radius_ = 1, const double sigma_
  596. = 0.5
  597. </font>
  598. </td>
  599. <td>
  600. <font size="-1">
  601. Blur image. The <i>radius_ </i>parameter
  602. specifies the radius of the Gaussian, in pixels, not counting the
  603. center
  604. pixel.&#160; The <i>sigma_</i> parameter specifies the standard
  605. deviation of the Laplacian, in pixels.
  606. </font>
  607. </td>
  608. </tr>
  609. <tr>
  610. <td style="vertical-align: middle; text-align: center;">
  611. <small>
  612. <a name="blurChannel"></a>blurChannel<br />
  613. </small>
  614. </td>
  615. <td style="vertical-align: middle;">
  616. <small>
  617. const ChannelType
  618. channel_, const double radius_ = 0.0, const double sigma_ = 1.0<br />
  619. </small>
  620. </td>
  621. <td style="vertical-align: middle;">
  622. <font size="-1">
  623. Blur an image
  624. channel. The <span style="font-style: italic;">channel_</span>
  625. parameter specifies the channel to blur. The <i>radius_ </i>parameter
  626. specifies the radius of the Gaussian, in pixels, not counting the
  627. center
  628. pixel.&#160; The <i>sigma_</i> parameter specifies the standard
  629. deviation of the Laplacian, in pixels.
  630. </font>
  631. </td>
  632. </tr>
  633. <tr>
  634. <td style="text-align: center;">
  635. <center><a name="border"></a> <font size="-1">border</font></center>
  636. </td>
  637. <td>
  638. <font size="-1">
  639. const <a href="Geometry.html">Geometry</a>
  640. &amp;geometry_ = "6x6+0+0"
  641. </font>
  642. </td>
  643. <td>
  644. <font size="-1">
  645. Border image (add border to image).&#160; The
  646. color of the border is specified by the <i>borderColor</i> attribute.
  647. </font>
  648. </td>
  649. </tr>
  650. <tr>
  651. <td style="text-align: center;">
  652. <center><a name="cdl"></a> <font size="-1">cdl</font></center>
  653. </td>
  654. <td><font size="-1">const std::string &amp;cdl_</font></td>
  655. <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>
  656. </tr>
  657. <tr>
  658. <td style="text-align: center;">
  659. <center><a name="channel"></a> <font size="-1">channel</font></center>
  660. </td>
  661. <td>
  662. <font size="-1">
  663. <a href="https://imagemagick.org/Magick++/Enumerations.html#ChannelType">ChannelType</a>
  664. layer_
  665. </font>
  666. </td>
  667. <td>
  668. <font size="-1">
  669. Extract channel from image. Use this option
  670. to extract a particular channel from&#160; the image.&#160; <i>alphaChannel</i>
  671. &#160; for&#160; example, is useful for extracting the opacity values
  672. from an image.
  673. </font>
  674. </td>
  675. </tr>
  676. <tr>
  677. <td style="text-align: center;">
  678. <center><a name="charcoal"></a> <font size="-1">charcoal</font></center>
  679. </td>
  680. <td>
  681. <font size="-1">
  682. const double radius_ = 1, const double sigma_
  683. = 0.5
  684. </font>
  685. </td>
  686. <td>
  687. <font size="-1">
  688. Charcoal effect image (looks like charcoal
  689. sketch). The <i>radius_</i> parameter specifies the radius of the
  690. Gaussian, in pixels, not counting the center pixel.&#160; The <i>sigma_</i>
  691. parameter specifies the standard deviation of the Laplacian, in pixels.
  692. </font>
  693. </td>
  694. </tr>
  695. <tr>
  696. <td style="text-align: center;">
  697. <center><a name="chop"></a> <font size="-1">chop</font></center>
  698. </td>
  699. <td>
  700. <font size="-1">
  701. const <a href="Geometry.html">Geometry</a>
  702. &amp;geometry_
  703. </font>
  704. </td>
  705. <td>
  706. <font size="-1">
  707. Chop image (remove vertical or horizontal
  708. subregion of image)
  709. </font>
  710. </td>
  711. </tr>
  712. <tr>
  713. <td style="text-align: center;">
  714. <center><a name="colorize"></a> <font size="-1">colorize</font></center>
  715. </td>
  716. <td>
  717. <font size="-1">
  718. const unsigned int opacityRed_, const
  719. unsigned int opacityGreen_, const unsigned int opacityBlue_, const
  720. Color &amp;penColor_
  721. </font>
  722. </td>
  723. <td>
  724. <font size="-1">
  725. Colorize image with pen color, using
  726. specified percent opacity for red, green, and blue quantums.
  727. </font>
  728. </td>
  729. </tr>
  730. <tr>
  731. <td style="text-align: center;">
  732. <center><a name="colorMatrix"></a> <font size="-1">colorMatrix</font></center>
  733. </td>
  734. <td><font size="-1">const size_t order_, const double *color_matrix_</font></td>
  735. <td><font size="-1">apply color correction to the image.</font></td>
  736. </tr>
  737. <tr>
  738. <td style="text-align: center;">
  739. <center><a name="comment"></a> <font size="-1">comment</font></center>
  740. </td>
  741. <td><font size="-1">const std::string &amp;comment_</font></td>
  742. <td>
  743. <font size="-1">
  744. Comment image (add comment string to
  745. image).&#160; By default, each image is commented with its file name.
  746. Use&#160; this&#160; method to&#160; assign a specific comment to the
  747. image.&#160; Optionally you can include the image filename, type,
  748. width, height, or other&#160; image&#160; attributes by embedding <a href="https://imagemagick.org/Magick++/FormatCharacters.html">special format characters.</a>
  749. </font>
  750. </td>
  751. </tr>
  752. <tr>
  753. <td style="text-align: center;" valign="middle">
  754. <font size="-1">
  755. <a name="compare"></a> compare<br />
  756. </font>
  757. </td>
  758. <td valign="middle">
  759. <font size="-1">
  760. const Image &amp;reference_<br />
  761. </font>
  762. </td>
  763. <td valign="top">
  764. <font size="-1">
  765. Compare current image with
  766. another image. Sets <a href="Image++.html#meanErrorPerPixel">meanErrorPerPixel</a>
  767. , <a href="Image++.html#normalizedMaxError">normalizedMaxError</a> , and <a href="Image++.html#normalizedMeanError">normalizedMeanError</a> in the current
  768. image. False is returned if the images are identical. An ErrorOption
  769. exception is thrown if the reference image columns, rows, colorspace,
  770. or
  771. matte differ from the current image.
  772. </font><br />
  773. </td>
  774. </tr>
  775. <tr>
  776. <td style="text-align: center;" rowspan="3">
  777. <center><a name="composite"></a> <font size="-1">composite</font></center>
  778. </td>
  779. <td>
  780. <font size="-1">
  781. const <a href="Image++.html">Image</a>
  782. &amp;compositeImage_, ssize_t xOffset_, ssize_t yOffset_, <a href="https://imagemagick.org/Magick++/Enumerations.html#CompositeOperator">CompositeOperator</a>
  783. compose_ = <i>InCompositeOp</i>
  784. </font>
  785. </td>
  786. <td>
  787. <font size="-1">
  788. Compose an image onto the current image at
  789. offset specified by <i>xOffset_</i>, <i>yOffset_ </i>using the
  790. composition algorithm specified by <i>compose_</i>.&#160;
  791. </font>
  792. </td>
  793. </tr>
  794. <tr>
  795. <td>
  796. <font size="-1">
  797. const <a href="Image++.html">Image</a>
  798. &amp;compositeImage_, const <a href="Geometry.html">Geometry</a>
  799. &amp;offset_, <a href="https://imagemagick.org/Magick++/Enumerations.html#CompositeOperator">CompositeOperator</a>
  800. compose_ = <i>InCompositeOp</i>
  801. </font>
  802. </td>
  803. <td>
  804. <font size="-1">
  805. Compose an image onto the current image at
  806. offset specified by <i>offset_</i> using the composition algorithm
  807. specified by <i>compose_</i> .&#160;
  808. </font>
  809. </td>
  810. </tr>
  811. <tr>
  812. <td>
  813. <font size="-1">
  814. const <a href="Image++.html">Image</a>
  815. &amp;compositeImage_, <a href="https://imagemagick.org/Magick++/Enumerations.html#GravityType">GravityType</a>
  816. gravity_, <a href="https://imagemagick.org/Magick++/Enumerations.html#CompositeOperator">CompositeOperator</a>
  817. compose_ = <i>InCompositeOp</i>
  818. </font>
  819. </td>
  820. <td>
  821. <font size="-1">
  822. Compose an image onto the current image with
  823. placement specified by <i>gravity_ </i>using the composition
  824. algorithm
  825. specified by <i>compose_</i>.&#160;
  826. </font>
  827. </td>
  828. </tr>
  829. <tr>
  830. <td style="text-align: center;">
  831. <center><a name="contrast"></a> <font size="-1">contrast</font></center>
  832. </td>
  833. <td><font size="-1">size_t sharpen_</font></td>
  834. <td>
  835. <font size="-1">
  836. Contrast image (enhance intensity differences
  837. in image)
  838. </font>
  839. </td>
  840. </tr>
  841. <tr>
  842. <td style="text-align: center;">
  843. <center><a name="convolve"></a> <font size="-1">convolve</font></center>
  844. </td>
  845. <td><font size="-1">size_t order_, const double *kernel_</font></td>
  846. <td>
  847. <font size="-1">
  848. Convolve image.&#160; Applies a user-specfied
  849. convolution to the image. The <i>order_</i> parameter represents the
  850. number of columns and rows in the filter kernel, and <i>kernel_</i>
  851. is a two-dimensional array of doubles representing the convolution
  852. kernel to apply.
  853. </font>
  854. </td>
  855. </tr>
  856. <tr>
  857. <td style="text-align: center;">
  858. <center><a name="crop"></a> <font size="-1">crop</font></center>
  859. </td>
  860. <td>
  861. <font size="-1">
  862. const <a href="Geometry.html">Geometry</a>
  863. &amp;geometry_
  864. </font>
  865. </td>
  866. <td><font size="-1">Crop image (subregion of original image)</font></td>
  867. </tr>
  868. <tr>
  869. <td style="text-align: center;">
  870. <center><a name="cycleColormap"></a> <font size="-1">cycleColormap</font></center>
  871. </td>
  872. <td><font size="-1">int amount_</font></td>
  873. <td><font size="-1">Cycle image colormap</font></td>
  874. </tr>
  875. <tr>
  876. <td style="text-align: center;">
  877. <center><a name="despeckle"></a> <font size="-1">despeckle</font></center>
  878. </td>
  879. <td><font size="-1">void</font></td>
  880. <td><font size="-1">Despeckle image (reduce speckle noise)</font></td>
  881. </tr>
  882. <tr>
  883. <td style="text-align: center;">
  884. <center><a name="display"></a> <font size="-1">display</font></center>
  885. </td>
  886. <td><font size="-1">void</font></td>
  887. <td>
  888. <font size="-1">Display image on screen.</font> <br />
  889. <font size="-1">
  890. <b><font color="#ff0000">Caution: </font></b> if
  891. an image format is not compatible with the display visual (e.g.
  892. JPEG on a colormapped display) then the original image will be
  893. altered. Use a copy of the original if this is a problem.
  894. </font>
  895. </td>
  896. </tr>
  897. <tr>
  898. <td>
  899. <center><a name="distort"></a> <font size="-1">distort</font></center>
  900. </td>
  901. <td><font size="-1">const DistortImageMethod method, const size_t number_arguments, const double *arguments, const bool bestfit = false </font></td>
  902. <td>
  903. <font size="-1">
  904. Distort image.&#160; Applies a user-specfied
  905. distortion to the image.
  906. </font>
  907. </td>
  908. </tr>
  909. <tr>
  910. <td style="text-align: center;" rowspan="2">
  911. <center><a name="draw"></a> <font size="-1">draw</font></center>
  912. </td>
  913. <td>
  914. <font size="-1">
  915. const <a href="Drawable.html">Drawable</a>
  916. &amp;drawable_
  917. </font>
  918. </td>
  919. <td><font size="-1">Draw shape or text on image.</font></td>
  920. </tr>
  921. <tr>
  922. <td>
  923. <font size="-1">
  924. const std::list&lt;<a href="Drawable.html">Drawable</a>
  925. &gt; &amp;drawable_
  926. </font>
  927. </td>
  928. <td>
  929. <font size="-1">
  930. Draw shapes or text on image using a set of
  931. Drawable objects contained in an STL list. Use of this method improves
  932. drawing performance and allows batching draw objects together in a
  933. list for repeated use.
  934. </font>
  935. </td>
  936. </tr>
  937. <tr>
  938. <td style="text-align: center;">
  939. <center><a name="edge"></a> <font size="-1">edge</font></center>
  940. </td>
  941. <td><font size="-1">size_t radius_ = 0.0</font></td>
  942. <td>
  943. <font size="-1">
  944. Edge image (hilight edges in image).&#160;
  945. The radius is the radius of the pixel neighborhood.. Specify a radius
  946. of zero for automatic radius selection.
  947. </font>
  948. </td>
  949. </tr>
  950. <tr>
  951. <td style="text-align: center;">
  952. <center><a name="emboss"></a> <font size="-1">emboss</font></center>
  953. </td>
  954. <td>
  955. <font size="-1">
  956. const double radius_ = 1, const double sigma_
  957. = 0.5
  958. </font>
  959. </td>
  960. <td>
  961. <font size="-1">
  962. Emboss image (hilight edges with 3D effect).
  963. The <i> radius_</i> parameter specifies the radius of the Gaussian, in
  964. pixels, not counting the center pixel.&#160; The <i>sigma_</i>
  965. parameter specifies the standard deviation of the Laplacian, in pixels.
  966. </font>
  967. </td>
  968. </tr>
  969. <tr>
  970. <td style="text-align: center;">
  971. <center><a name="enhance"></a> <font size="-1">enhance</font></center>
  972. </td>
  973. <td><font size="-1">void</font></td>
  974. <td><font size="-1">Enhance image (minimize noise)</font></td>
  975. </tr>
  976. <tr>
  977. <td style="text-align: center;">
  978. <center><a name="equalize"></a> <font size="-1">equalize</font></center>
  979. </td>
  980. <td><font size="-1">void</font></td>
  981. <td><font size="-1">Equalize image (histogram equalization)</font></td>
  982. </tr>
  983. <tr>
  984. <td style="text-align: center;">
  985. <center><a name="erase"></a> <font size="-1">erase</font></center>
  986. </td>
  987. <td><font size="-1">void</font></td>
  988. <td>
  989. <font size="-1">
  990. Set all image pixels to the current
  991. background color.
  992. </font>
  993. </td>
  994. </tr>
  995. <tr>
  996. <td style="text-align: center;" rowspan="4">
  997. <center><a name="extent"></a> <font size="-1">extent</font></center>
  998. </td>
  999. <td><font size="-1">const <a href="Geometry.html"> Geometry</a> &amp;geometry_</font></td>
  1000. <td rowspan="2"><font size="-1">extends the image as defined by the geometry, gravity, and image background color.</font></td>
  1001. </tr>
  1002. <tr>
  1003. <td>
  1004. <font size="-1">
  1005. const <a href="Geometry.html">Geometry</a>
  1006. &amp;geometry_, const <a href="Color.html">Color</a> &amp;backgroundColor_
  1007. </font>
  1008. </td>
  1009. </tr>
  1010. <tr>
  1011. <td>
  1012. <font size="-1">
  1013. const <a href="Geometry.html"> Geometry</a> &amp;geometry_, const <a href="https://imagemagick.org/Magick++/Enumerations.html#GravityType">GravityType</a>
  1014. &amp;gravity_
  1015. </font>
  1016. </td>
  1017. <td rowspan="2"><font size="-1">extends the image as defined by the geometry, gravity, and image background color.</font></td>
  1018. </tr>
  1019. <tr>
  1020. <td>
  1021. <font size="-1">
  1022. const <a href="Geometry.html">Geometry</a>
  1023. &amp;geometry_, const <a href="Color.html">Color</a> &amp;backgroundColor_,
  1024. const <a href="https://imagemagick.org/Magick++/Enumerations.html#GravityType">GravityType</a> &amp;gravity_
  1025. </font>
  1026. </td>
  1027. </tr>
  1028. <tr>
  1029. <td style="text-align: center;">
  1030. <center><a name="flip"></a> <font size="-1">flip</font></center>
  1031. </td>
  1032. <td><font size="-1">void</font></td>
  1033. <td>
  1034. <font size="-1">
  1035. Flip image (reflect each scanline in the
  1036. vertical direction)
  1037. </font>
  1038. </td>
  1039. </tr>
  1040. <tr>
  1041. <td style="text-align: center;" rowspan="4">
  1042. <center>
  1043. <a name="floodFillColor"></a> <font size="-1">floodFill-</font>
  1044. <br />
  1045. <font size="-1">Color</font>
  1046. </center>
  1047. </td>
  1048. <td>
  1049. <font size="-1">
  1050. ssize_t x_, ssize_t y_, const <a href="Color.html">Color</a> &amp;fillColor_
  1051. </font>
  1052. </td>
  1053. <td rowspan="2">
  1054. <font size="-1">
  1055. Flood-fill color across pixels
  1056. that match the color of the target pixel and are neighbors of the
  1057. target pixel. Uses current fuzz setting when determining color match.
  1058. </font>
  1059. </td>
  1060. </tr>
  1061. <tr>
  1062. <td>
  1063. <font size="-1">
  1064. const <a href="Geometry.html">Geometry</a>
  1065. &amp;point_, const <a href="Color.html">Color</a> &amp;fillColor_
  1066. </font>
  1067. </td>
  1068. </tr>
  1069. <tr>
  1070. <td>
  1071. <font size="-1">
  1072. ssize_t x_, ssize_t y_, const <a href="Color.html">Color</a> &amp;fillColor_, const <a href="Color.html">Color</a>
  1073. &amp;borderColor_
  1074. </font>
  1075. </td>
  1076. <td rowspan="2">
  1077. <font size="-1">
  1078. Flood-fill color across pixels
  1079. starting at target-pixel and stopping at pixels matching specified
  1080. border color. Uses current fuzz setting when determining color match.
  1081. </font>
  1082. </td>
  1083. </tr>
  1084. <tr>
  1085. <td>
  1086. <font size="-1">
  1087. const <a href="Geometry.html">Geometry</a>
  1088. &amp;point_, const <a href="Color.html">Color</a> &amp;fillColor_,
  1089. const <a href="Color.html">Color</a> &amp;borderColor_
  1090. </font>
  1091. </td>
  1092. </tr>
  1093. <tr>
  1094. <td style="text-align: center;">
  1095. <a name="floodFillOpacity"></a> <font size="-1">floodFillOpacity</font>
  1096. </td>
  1097. <td>
  1098. <font size="-1">
  1099. const long x_, const long y_, const unsigned int
  1100. opacity_, const PaintMethod method_
  1101. </font>
  1102. </td>
  1103. <td>
  1104. <font size="-1">
  1105. Floodfill pixels matching color (within fuzz
  1106. factor) of target pixel(x,y) with replacement opacity value using
  1107. method.
  1108. </font>
  1109. </td>
  1110. </tr>
  1111. <tr>
  1112. <td style="text-align: center;" rowspan="4">
  1113. <center>
  1114. <a name="floodFillTexture"></a> <font size="-1">floodFill-</font>
  1115. <br />
  1116. <font size="-1">Texture</font>
  1117. </center>
  1118. </td>
  1119. <td>
  1120. <font size="-1">
  1121. ssize_t x_, ssize_t y_,&#160; const
  1122. Image &amp;texture_
  1123. </font>
  1124. </td>
  1125. <td rowspan="2">
  1126. <font size="-1">
  1127. Flood-fill texture across pixels
  1128. that match the color of the target pixel and are neighbors of the
  1129. target pixel. Uses current fuzz setting when determining color match.
  1130. </font>
  1131. </td>
  1132. </tr>
  1133. <tr>
  1134. <td>
  1135. <font size="-1">
  1136. const <a href="Geometry.html">Geometry</a>
  1137. &amp;point_, const Image &amp;texture_
  1138. </font>
  1139. </td>
  1140. </tr>
  1141. <tr>
  1142. <td>
  1143. <font size="-1">
  1144. ssize_t x_, ssize_t y_, const Image
  1145. &amp;texture_, const <a href="Color.html">Color</a> &amp;borderColor_
  1146. </font>
  1147. </td>
  1148. <td rowspan="2">
  1149. <font size="-1">
  1150. Flood-fill texture across pixels
  1151. starting at target-pixel and stopping at pixels matching specified
  1152. border color. Uses current fuzz setting when determining color match.
  1153. </font>
  1154. </td>
  1155. </tr>
  1156. <tr>
  1157. <td>
  1158. <font size="-1">
  1159. const <a href="Geometry.html">Geometry</a>
  1160. &amp;point_, const Image &amp;texture_, const <a href="Color.html">
  1161. Color
  1162. </a>
  1163. &amp;borderColor_
  1164. </font>
  1165. </td>
  1166. </tr>
  1167. <tr>
  1168. <td style="text-align: center;">
  1169. <center><a name="flop"></a> <font size="-1">flop</font></center>
  1170. </td>
  1171. <td><font size="-1">void&#160;</font></td>
  1172. <td>
  1173. <font size="-1">
  1174. Flop image (reflect each scanline in the
  1175. horizontal direction)
  1176. </font>
  1177. </td>
  1178. </tr>
  1179. <tr>
  1180. <td style="text-align: center;" rowspan="2">
  1181. <center><a name="frame"></a> <font size="-1">frame</font></center>
  1182. </td>
  1183. <td>
  1184. <font size="-1">
  1185. const <a href="Geometry.html">Geometry</a>
  1186. &amp;geometry_ = "25x25+6+6"
  1187. </font>
  1188. </td>
  1189. <td rowspan="2"><font size="-1">Add decorative frame around image</font></td>
  1190. </tr>
  1191. <tr>
  1192. <td>
  1193. <font size="-1">
  1194. size_t width_, size_t height_,
  1195. ssize_t x_, ssize_t y_, ssize_t innerBevel_ = 0, ssize_t outerBevel_ = 0
  1196. </font>
  1197. </td>
  1198. </tr>
  1199. <tr>
  1200. <td>
  1201. <center><a name="fx"></a> <font size="-1">fx</font></center>
  1202. </td>
  1203. <td><font size="-1">const std::string expression, const Magick::ChannelType channel</font></td>
  1204. <td>
  1205. <font size="-1">
  1206. Fx image.&#160; Applies a mathematical
  1207. expression to the image.
  1208. </font>
  1209. </td>
  1210. </tr>
  1211. <tr>
  1212. <td style="text-align: center;" rowspan="2">
  1213. <center><a name="gamma"></a> <font size="-1">gamma</font></center>
  1214. </td>
  1215. <td><font size="-1">double gamma_</font></td>
  1216. <td>
  1217. <font size="-1">
  1218. Gamma correct image (uniform red, green, and
  1219. blue correction).
  1220. </font>
  1221. </td>
  1222. </tr>
  1223. <tr>
  1224. <td>
  1225. <font size="-1">
  1226. double gammaRed_, double gammaGreen_, double
  1227. gammaBlue_
  1228. </font>
  1229. </td>
  1230. <td>
  1231. <font size="-1">
  1232. Gamma correct red, green, and blue channels
  1233. of image.
  1234. </font>
  1235. </td>
  1236. </tr>
  1237. <tr>
  1238. <td style="text-align: center;">
  1239. <center><a name="gaussianBlur"></a> <font size="-1">gaussianBlur</font></center>
  1240. </td>
  1241. <td><font size="-1">const double width_, const double sigma_</font></td>
  1242. <td>
  1243. <font size="-1">
  1244. Gaussian blur image. The number of neighbor
  1245. pixels to be included in the convolution mask is specified by
  1246. 'width_'.&#160; For example, a width of one gives a (standard) 3x3
  1247. convolution mask. The standard deviation of the gaussian bell curve is
  1248. specified by 'sigma_'.
  1249. </font>
  1250. </td>
  1251. </tr>
  1252. <tr>
  1253. <td style="vertical-align: middle; text-align: center;">
  1254. <small>
  1255. <a name="gaussianBlurChannel"></a>gaussianBlurChannel<br />
  1256. </small>
  1257. </td>
  1258. <td style="vertical-align: middle;">
  1259. <small>
  1260. const ChannelType
  1261. channel_, const double radius_ = 0.0, const double sigma_ = 1.0<br />
  1262. </small>
  1263. </td>
  1264. <td style="vertical-align: middle;">
  1265. <font size="-1">
  1266. Gaussian blur
  1267. an image channel.
  1268. </font><font size="-1">
  1269. The <span style="font-style: italic;">channel_</span> parameter specifies the
  1270. channel to blur.
  1271. </font><font size="-1">
  1272. The number of neighbor
  1273. pixels to be included in the convolution mask is specified by
  1274. 'width_'.&#160; For example, a width of one gives a (standard) 3x3
  1275. convolution mask. The standard deviation of the gaussian bell curve is
  1276. specified by 'sigma_'.
  1277. </font>
  1278. </td>
  1279. </tr>
  1280. <tr>
  1281. <td style="text-align: center;" valign="middle">
  1282. <font size="-1">
  1283. <a name="haldClut"></a> haldClut<br />
  1284. </font>
  1285. </td>
  1286. <td valign="middle">
  1287. <font size="-1">
  1288. const Image &amp;reference_<br />
  1289. </font>
  1290. </td>
  1291. <td valign="top">
  1292. <font size="-1">apply a Hald color lookup table to the image.</font><br />
  1293. </td>
  1294. </tr>
  1295. <tr>
  1296. <td style="text-align: center;">
  1297. <center><a name="implode"></a> <font size="-1">implode</font></center>
  1298. </td>
  1299. <td><font size="-1">const double factor_</font></td>
  1300. <td><font size="-1">Implode image (special effect)</font></td>
  1301. </tr>
  1302. <tr>
  1303. <td style="text-align: center;">
  1304. <center><a name="inverseFourierTransform"></a> <font size="-1">inverseFourierTransform</font></center>
  1305. </td>
  1306. <td><font size="-1">const Image &amp;phaseImage_, const bool magnitude_</font></td>
  1307. <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>
  1308. </tr>
  1309. <tr>
  1310. <td style="text-align: center;">
  1311. <center><a name="label"></a> <font size="-1">label</font></center>
  1312. </td>
  1313. <td><font size="-1">const string &amp;label_</font></td>
  1314. <td>
  1315. <font size="-1">
  1316. Assign a label to an image. Use this option
  1317. to&#160; assign&#160; a&#160; specific label to the image. Optionally
  1318. you can include the image filename, type, width, height, or scene
  1319. number in the label by embedding&#160; <a href="https://imagemagick.org/Magick++/FormatCharacters.html">
  1320. special format characters.
  1321. </a> If the first character of string is @,
  1322. the
  1323. image label is read from a file titled by the remaining characters in
  1324. the string. When converting to Postscript, use this&#160; option to
  1325. specify a header string to print above the image.
  1326. </font>
  1327. </td>
  1328. </tr>
  1329. <tr>
  1330. <td style="vertical-align: top; text-align: center;">
  1331. <small>
  1332. <a name="level"></a>level<br />
  1333. </small>
  1334. </td>
  1335. <td style="vertical-align: top;">
  1336. <small>
  1337. const double black_point,
  1338. const double white_point, const double mid_point=1.0<br />
  1339. </small>
  1340. </td>
  1341. <td style="vertical-align: top;">
  1342. <small>
  1343. Level image. Adjust the
  1344. levels of the image by scaling the colors falling between specified
  1345. white and black points to the full available quantum range. The
  1346. parameters provided represent the black, mid (gamma), and white
  1347. points.&#160; The black point specifies the darkest color in the image.
  1348. Colors darker than the black point are set to zero. Mid point (gamma)
  1349. specifies a gamma correction to apply to the image. White point
  1350. specifies the lightest color in the image.&#160; Colors brighter than
  1351. the white point are set to the maximum quantum value. The black and
  1352. white point have the valid range 0 to MaxRGB while mid (gamma) has a
  1353. useful range of 0 to ten.<br />
  1354. </small>
  1355. </td>
  1356. </tr>
  1357. <tr>
  1358. <td style="vertical-align: middle; text-align: center;">
  1359. <small>
  1360. <a name="levelChannel"></a>levelChannel<br />
  1361. </small>
  1362. </td>
  1363. <td style="vertical-align: middle;">
  1364. <small>
  1365. const ChannelType
  1366. channel, const double black_point, const double white_point, const
  1367. double mid_point=1.0<br />
  1368. </small>
  1369. </td>
  1370. <td style="vertical-align: middle;">
  1371. <small>
  1372. Level image channel.
  1373. Adjust the levels of the image channel by scaling the values falling
  1374. between specified white and black points to the full available quantum
  1375. range. The parameters provided represent the black, mid (gamma), and
  1376. white points. The black point specifies the darkest color in the image.
  1377. Colors darker than the black point are set to zero. Mid point (gamma)
  1378. specifies a gamma correction to apply to the image. White point
  1379. specifies the lightest color in the image. Colors brighter than the
  1380. white point are set to the maximum quantum value. The black and white
  1381. point have the valid range 0 to MaxRGB while mid (gamma) has a useful
  1382. range of 0 to ten.<br />
  1383. </small>
  1384. </td>
  1385. </tr>
  1386. <tr>
  1387. <td style="text-align: center;">
  1388. <center><a name="magnify"></a> <font size="-1">magnify</font></center>
  1389. </td>
  1390. <td><font size="-1">void</font></td>
  1391. <td><font size="-1">Magnify image by integral size</font></td>
  1392. </tr>
  1393. <tr>
  1394. <td style="text-align: center;">
  1395. <center><a name="map"></a> <font size="-1">map</font></center>
  1396. </td>
  1397. <td>
  1398. <font size="-1">
  1399. const Image &amp;mapImage_ , bool dither_ =
  1400. false
  1401. </font>
  1402. </td>
  1403. <td>
  1404. <font size="-1">
  1405. Remap image colors with closest color from
  1406. reference image. Set dither_ to <i>true</i> in to apply
  1407. Floyd/Steinberg
  1408. error diffusion to the image. By default, color reduction chooses an
  1409. optimal&#160; set&#160; of colors that best represent the original
  1410. image. Alternatively, you can&#160; choose&#160; a&#160;
  1411. particular&#160; set&#160; of colors&#160; from&#160; an image file
  1412. with this option.
  1413. </font>
  1414. </td>
  1415. </tr>
  1416. <tr>
  1417. <td style="text-align: center;">
  1418. <center><a name="floodFillAlpha"></a> <font size="-1">floodFillAlpha</font></center>
  1419. </td>
  1420. <td>
  1421. <font size="-1">
  1422. const ssize_t x_, const ssize_t, const unsigned int&#160; alpha_, const <a href="Color.html">Color</a> &amp;target_, const bool invert_
  1423. </font>
  1424. </td>
  1425. <td>
  1426. <font size="-1">
  1427. Floodfill designated area with a replacement alpha value.
  1428. </font>
  1429. </td>
  1430. </tr>
  1431. <tr>
  1432. <td style="text-align: center;">
  1433. <a name="medianFilter"></a> <font size="-1">medianFilter</font>
  1434. </td>
  1435. <td><font size="-1">const double radius_ = 0.0</font></td>
  1436. <td>
  1437. <font size="-1">
  1438. Filter image by replacing each pixel
  1439. component with the median color in a circular neighborhood
  1440. </font>
  1441. </td>
  1442. </tr>
  1443. <tr>
  1444. <td style="text-align: center;">
  1445. <center><a name="mergeLayers"></a> <font size="-1">mergeLayers</font></center>
  1446. </td>
  1447. <td>
  1448. <font size="-1">
  1449. <a href="https://imagemagick.org/Magick++/Enumerations.html#LayerMethod">LayerMethod</a>
  1450. noiseType_
  1451. </font>
  1452. </td>
  1453. <td><font size="-1">handle multiple images forming a set of image layers or animation frames.</font></td>
  1454. </tr>
  1455. <tr>
  1456. <td style="text-align: center;">
  1457. <center><a name="minify"></a> <font size="-1">minify</font></center>
  1458. </td>
  1459. <td><font size="-1">void</font></td>
  1460. <td><font size="-1">Reduce image by integral size</font></td>
  1461. </tr>
  1462. <tr>
  1463. <td style="text-align: center;">
  1464. <a name="modifyImage"></a> <font size="-1">modifyImage</font>
  1465. </td>
  1466. <td><font size="-1">void</font></td>
  1467. <td>
  1468. <font size="-1">
  1469. Prepare to update image. Ensures that there
  1470. is only one reference to the underlying image so that the underlying
  1471. image may be safely modified without effecting previous generations of
  1472. the image. Copies the underlying image to a new image if necessary.
  1473. </font>
  1474. </td>
  1475. </tr>
  1476. <tr>
  1477. <td style="text-align: center;">
  1478. <center><a name="modulate"></a> <font size="-1">modulate</font></center>
  1479. </td>
  1480. <td>
  1481. <font size="-1">
  1482. double brightness_, double saturation_,
  1483. double hue_
  1484. </font>
  1485. </td>
  1486. <td>
  1487. <font size="-1">
  1488. Modulate percent hue, saturation, and
  1489. brightness of an image. Modulation of saturation and brightness is as a
  1490. ratio of the current value (1.0 for no change). Modulation of hue is an
  1491. absolute rotation of -180 degrees to +180 degrees from the current
  1492. position corresponding to an argument range of 0 to 2.0 (1.0 for no
  1493. change).
  1494. </font>
  1495. </td>
  1496. </tr>
  1497. <tr>
  1498. <td style="vertical-align: middle; text-align: center;">
  1499. <small>
  1500. <a name="motionBlur"></a>motionBlur<br />
  1501. </small>
  1502. </td>
  1503. <td style="vertical-align: middle;">
  1504. <small>
  1505. const double radius_,
  1506. const double sigma_, const double angle_<br />
  1507. </small>
  1508. </td>
  1509. <td style="vertical-align: middle;">
  1510. <small>
  1511. Motion blur image with
  1512. specified blur factor. The radius_ parameter specifies the radius of
  1513. the Gaussian, in pixels, not counting the center pixel.&#160; The
  1514. sigma_ parameter specifies the standard deviation of the Laplacian, in
  1515. pixels. The angle_ parameter specifies the angle the object appears to
  1516. be comming from (zero degrees is from the right).<br />
  1517. </small>
  1518. </td>
  1519. </tr>
  1520. <tr>
  1521. <td style="text-align: center;">
  1522. <center><a name="negate"></a> <font size="-1">negate</font></center>
  1523. </td>
  1524. <td><font size="-1">bool grayscale_ = false</font></td>
  1525. <td>
  1526. <font size="-1">
  1527. Negate colors in image.&#160; Replace every
  1528. pixel with its complementary color (white becomes black, yellow becomes
  1529. blue, etc.).&#160; Set grayscale to only negate grayscale values in
  1530. image.
  1531. </font>
  1532. </td>
  1533. </tr>
  1534. <tr>
  1535. <td style="text-align: center;">
  1536. <center><a name="normalize"></a> <font size="-1">normalize</font></center>
  1537. </td>
  1538. <td><font size="-1">void</font></td>
  1539. <td>
  1540. <font size="-1">
  1541. Normalize image (increase contrast by
  1542. normalizing the pixel values to span the full range of color values).
  1543. </font>
  1544. </td>
  1545. </tr>
  1546. <tr>
  1547. <td style="text-align: center;">
  1548. <center><a name="oilPaint"></a> <font size="-1">oilPaint</font></center>
  1549. </td>
  1550. <td><font size="-1">size_t radius_ = 3</font></td>
  1551. <td><font size="-1">Oilpaint image (image looks like oil painting)</font></td>
  1552. </tr>
  1553. <tr>
  1554. <td style="text-align: center;">
  1555. <center><a name="opacity"></a> <font size="-1">opacity</font></center>
  1556. </td>
  1557. <td><font size="-1">unsigned int opacity_</font></td>
  1558. <td>
  1559. <font size="-1">
  1560. Set or attenuate the opacity channel in the
  1561. image. If the image pixels are opaque then they are set to the
  1562. specified
  1563. opacity value, otherwise they are blended with the supplied opacity
  1564. value.&#160; The value of opacity_ ranges from 0 (completely opaque) to
  1565. <i>MaxRGB</i>
  1566. . The defines <i>OpaqueOpacity</i> and <i>TransparentOpacity</i> are
  1567. available to specify completely opaque or completely transparent,
  1568. respectively.
  1569. </font>
  1570. </td>
  1571. </tr>
  1572. <tr>
  1573. <td style="text-align: center;">
  1574. <center><a name="opaque"></a> <font size="-1">opaque</font></center>
  1575. </td>
  1576. <td>
  1577. <font size="-1">
  1578. const <a href="Color.html">Color</a>
  1579. &amp;opaqueColor_, const <a href="Color.html">Color</a> &amp;penColor_
  1580. </font>
  1581. </td>
  1582. <td>
  1583. <font size="-1">
  1584. Change color of pixels matching opaqueColor_
  1585. to specified penColor_.
  1586. </font>
  1587. </td>
  1588. </tr>
  1589. <tr>
  1590. <td style="text-align: center;" rowspan="2">
  1591. <center><a name="ping"></a> <font size="-1">ping</font></center>
  1592. </td>
  1593. <td><font size="-1">const std::string &amp;imageSpec_</font></td>
  1594. <td rowspan="2">
  1595. <font size="-1">
  1596. Ping is similar to read
  1597. except only enough of the image is read to determine the image columns,
  1598. rows, and filesize.&#160; The <a href="Image++.html#columns">columns</a>
  1599. </font>,
  1600. <font size="-1">
  1601. <a href="Image++.html#rows">rows</a> , and <a href="Image++.html#fileSize">fileSize</a>
  1602. attributes are valid after invoking ping.&#160; The image data is not
  1603. valid after calling ping.
  1604. </font>
  1605. </td>
  1606. </tr>
  1607. <tr>
  1608. <td><font size="-1">const Blob &amp;blob_</font></td>
  1609. </tr>
  1610. <tr>
  1611. <td style="vertical-align: middle; text-align: center;">
  1612. <small>
  1613. <a name="process"></a>process<br />
  1614. </small>
  1615. </td>
  1616. <td style="vertical-align: middle;">
  1617. <small>
  1618. std::string name_,
  1619. const ssize_t argc_, char **argv_<br />
  1620. </small>
  1621. </td>
  1622. <td style="vertical-align: middle;">
  1623. <small>
  1624. Execute the named
  1625. process module, passing any arguments via an argument vector, with
  1626. argc_
  1627. specifying the number of arguments in the vector, and argv_ passing the
  1628. address of an array of null-terminated C strings which constitute the
  1629. argument vector. An exception is thrown if the requested process module
  1630. does not exist, fails to load, or fails during execution.
  1631. </small><br />
  1632. </td>
  1633. </tr>
  1634. <tr>
  1635. <td style="text-align: center;">
  1636. <center><a name="quantize"></a> <font size="-1">quantize</font></center>
  1637. </td>
  1638. <td><font size="-1">bool measureError_ = false</font></td>
  1639. <td>
  1640. <font size="-1">
  1641. Quantize image (reduce number of colors). Set
  1642. measureError_ to true in order to calculate error attributes.
  1643. </font>
  1644. </td>
  1645. </tr>
  1646. <tr>
  1647. <td style="text-align: center;">
  1648. <center><a name="raise"></a> <font size="-1">raise</font></center>
  1649. </td>
  1650. <td>
  1651. <font size="-1">
  1652. const <a href="Geometry.html">Geometry</a>
  1653. &amp;geometry_ = "6x6+0+0",&#160; bool raisedFlag_ =&#160; false
  1654. </font>
  1655. </td>
  1656. <td>
  1657. <font size="-1">
  1658. Raise image (lighten or darken the edges of
  1659. an image to give a 3-D raised or lowered effect)
  1660. </font>
  1661. </td>
  1662. </tr>
  1663. <tr>
  1664. <td style="text-align: center;" rowspan="8">
  1665. <center><a name="read"></a> <font size="-1">read</font></center>
  1666. </td>
  1667. <td><font size="-1">const string &amp;imageSpec_</font></td>
  1668. <td><font size="-1">Read image into current object</font></td>
  1669. </tr>
  1670. <tr>
  1671. <td>
  1672. <font size="-1">
  1673. const <a href="Geometry.html">Geometry</a>
  1674. &amp;size_, const std::string &amp;imageSpec_
  1675. </font>
  1676. </td>
  1677. <td>
  1678. <font size="-1">
  1679. Read image of specified size into current
  1680. object. This form is useful for images that do not specifiy their size
  1681. or to specify a size hint for decoding an image. For example, when
  1682. reading a Photo CD, JBIG, or JPEG image, a size request causes the
  1683. library to return an image which is the next resolution greater or
  1684. equal to the specified size. This may result in memory and time savings.
  1685. </font>
  1686. </td>
  1687. </tr>
  1688. <tr>
  1689. <td><font size="-1">const <a href="Blob.html">Blob</a> &amp;blob_</font></td>
  1690. <td rowspan="5">
  1691. <font size="-1">
  1692. Read encoded image of specified
  1693. size from an in-memory <a href="Blob.html">BLOB</a> into current
  1694. object. Depending on the method arguments, the Blob size, depth, and
  1695. format may also be specified. Some image formats require that size be
  1696. specified. The default ImageMagick uses for depth depends on its
  1697. Quantum size (8 or 16).&#160; If ImageMagick's Quantum size does not
  1698. match that of the image, the depth may need to be specified.
  1699. ImageMagick can usually automagically detect the image's format.
  1700. When
  1701. a format can't be automagically detected, the format must be specified.
  1702. </font>
  1703. </td>
  1704. </tr>
  1705. <tr>
  1706. <td>
  1707. <font size="-1">
  1708. const <a href="Blob.html">Blob</a>
  1709. &amp;blob_, const <a href="Geometry.html">Geometry</a> &amp;size_
  1710. </font>
  1711. </td>
  1712. </tr>
  1713. <tr>
  1714. <td>
  1715. <font size="-1">
  1716. const <a href="Blob.html">Blob</a>
  1717. &amp;blob_, const <a href="Geometry.html">Geometry</a> &amp;size_,
  1718. size_t depth_
  1719. </font>
  1720. </td>
  1721. </tr>
  1722. <tr>
  1723. <td>
  1724. <font size="-1">
  1725. const <a href="Blob.html">Blob</a>
  1726. &amp;blob_, const <a href="Geometry.html">Geometry</a> &amp;size_,
  1727. size_t depth_, const string &amp;magick_&#160;
  1728. </font>
  1729. </td>
  1730. </tr>
  1731. <tr>
  1732. <td>
  1733. <font size="-1">
  1734. const <a href="Blob.html">Blob</a>
  1735. &amp;blob_, const <a href="Geometry.html">Geometry</a> &amp;size_,
  1736. const
  1737. string &amp;magick_
  1738. </font>
  1739. </td>
  1740. </tr>
  1741. <tr>
  1742. <td>
  1743. <font size="-1">
  1744. const size_t width_, const size_t
  1745. height_, std::string map_, const StorageType type_, const void *pixels_
  1746. </font>
  1747. </td>
  1748. <td>
  1749. <font size="-1">
  1750. Read image based on an array of image pixels.
  1751. The pixel data must be in scanline order top-to-bottom. The data can be
  1752. character, short int, integer, float, or double. Float and double
  1753. require the pixels to be normalized [0..1]. The other types are
  1754. [0..MaxRGB].&#160; For example, to create a 640x480 image from
  1755. unsigned red-green-blue character data, use
  1756. </font>
  1757. <p>
  1758. <font size="-1">
  1759. &#160; image.read( 640, 480, "RGB", CharPixel,
  1760. pixels );
  1761. </font>
  1762. </p>
  1763. <p>
  1764. <font size="-1">The parameters are as follows:</font> <br />
  1765. &#160;
  1766. </p>
  1767. <table border="0" width="100%">
  1768. <tbody>
  1769. <tr>
  1770. <td><font size="-1">width_</font></td>
  1771. <td><font size="-1">Width in pixels of the image.</font></td>
  1772. </tr>
  1773. <tr>
  1774. <td><font size="-1">height_</font></td>
  1775. <td><font size="-1">Height in pixels of the image.</font></td>
  1776. </tr>
  1777. <tr>
  1778. <td><font size="-1">map_</font></td>
  1779. <td>
  1780. <font size="-1">
  1781. This character string can be any
  1782. combination or order of R = red, G = green, B = blue, A = alpha, C =
  1783. cyan, Y = yellow M = magenta, and K = black. The ordering reflects the
  1784. order of the pixels in the supplied pixel array.
  1785. </font>
  1786. </td>
  1787. </tr>
  1788. <tr>
  1789. <td><font size="-1">type_</font></td>
  1790. <td>
  1791. <font size="-1">
  1792. Pixel storage type (CharPixel,
  1793. ShortPixel, IntegerPixel, FloatPixel, or DoublePixel)
  1794. </font>
  1795. </td>
  1796. </tr>
  1797. <tr>
  1798. <td><font size="-1">pixels_</font></td>
  1799. <td>
  1800. <font size="-1">
  1801. This array of values contain the pixel
  1802. components as defined by the map_ and type_ parameters. The length of
  1803. the arrays must equal the area specified by the width_ and height_
  1804. values and type_ parameters.
  1805. </font>
  1806. </td>
  1807. </tr>
  1808. </tbody>
  1809. </table>
  1810. </td>
  1811. </tr>
  1812. <tr>
  1813. <td style="text-align: center;">
  1814. <center><a name="reduceNoise"></a> <font size="-1">reduceNoise</font></center>
  1815. </td>
  1816. <td><font size="-1">const double order_</font></td>
  1817. <td><font size="-1">reduce noise in image using a noise peak elimination filter.</font></td>
  1818. </tr>
  1819. <tr>
  1820. <td style="vertical-align: middle; text-align: center;">
  1821. <small>
  1822. <a name="randomThreshold"></a>randomThreshold<br />
  1823. </small>
  1824. </td>
  1825. <td style="vertical-align: middle;">
  1826. <small>
  1827. const Geometry
  1828. &amp;thresholds_<br />
  1829. </small>
  1830. </td>
  1831. <td style="vertical-align: middle;">
  1832. <small>
  1833. Random threshold the
  1834. image. Changes the value of individual pixels based on the intensity of
  1835. each pixel compared to a random threshold. The result is a
  1836. low-contrast, two color image. The thresholds_ argument is a
  1837. geometry containing LOWxHIGH thresholds. If the string contains
  1838. 2x2, 3x3, or 4x4, then an ordered dither of order 2, 3, or 4 will be
  1839. performed instead. This is a very fast alternative to 'quantize' based
  1840. dithering.<br />
  1841. </small>
  1842. </td>
  1843. </tr>
  1844. <tr>
  1845. <td style="vertical-align: middle; text-align: center;">
  1846. <small>
  1847. <a name="randomThresholdChannel"></a>randomThresholdChannel<br />
  1848. </small>
  1849. </td>
  1850. <td style="vertical-align: middle;">
  1851. <small>
  1852. const Geometry
  1853. &amp;thresholds_, const ChannelType channel_<br />
  1854. </small>
  1855. </td>
  1856. <td style="vertical-align: middle;">
  1857. <small>
  1858. Random threshold an
  1859. image channel. Similar to <a href="Image++.html#randomThreshold">randomThreshold</a>()
  1860. but restricted to the specified channel.<br />
  1861. </small>
  1862. </td>
  1863. </tr>
  1864. <tr>
  1865. <td style="text-align: center;">
  1866. <center><a name="roll"></a> <font size="-1">roll</font></center>
  1867. </td>
  1868. <td><font size="-1">int columns_, ssize_t rows_</font></td>
  1869. <td>
  1870. <font size="-1">
  1871. Roll image (rolls image vertically and
  1872. horizontally) by specified number of columnms and rows)
  1873. </font>
  1874. </td>
  1875. </tr>
  1876. <tr>
  1877. <td style="text-align: center;">
  1878. <center><a name="rotate"></a> <font size="-1">rotate</font></center>
  1879. </td>
  1880. <td><font size="-1">double degrees_</font></td>
  1881. <td>
  1882. <font size="-1">
  1883. Rotate image counter-clockwise by specified
  1884. number of degrees.
  1885. </font>
  1886. </td>
  1887. </tr>
  1888. <tr>
  1889. <td style="text-align: center;">
  1890. <center><a name="sample"></a> <font size="-1">sample</font></center>
  1891. </td>
  1892. <td>
  1893. <font size="-1">
  1894. const <a href="Geometry.html">Geometry</a>
  1895. &amp;geometry_&#160;
  1896. </font>
  1897. </td>
  1898. <td><font size="-1">Resize image by using pixel sampling algorithm</font></td>
  1899. </tr>
  1900. <tr>
  1901. <td style="text-align: center;">
  1902. <center><a name="scale"></a> <font size="-1">scale</font></center>
  1903. </td>
  1904. <td>
  1905. <font size="-1">
  1906. const <a href="Geometry.html">Geometry</a>
  1907. &amp;geometry_
  1908. </font>
  1909. </td>
  1910. <td><font size="-1">Resize image by using simple ratio algorithm</font></td>
  1911. </tr>
  1912. <tr>
  1913. <td style="text-align: center;">
  1914. <center><a name="segment"></a> <font size="-1">segment</font></center>
  1915. </td>
  1916. <td>
  1917. <font size="-1">double clusterThreshold_ = 1.0,</font> <br />
  1918. <font size="-1">double smoothingThreshold_ = 1.5</font>
  1919. </td>
  1920. <td>
  1921. <font size="-1">
  1922. Segment (coalesce similar image components)
  1923. by analyzing the histograms of the color components and identifying
  1924. units that are homogeneous with the fuzzy c-means technique. Also uses <i>quantizeColorSpace</i>
  1925. and <i>verbose</i> image attributes. Specify <i> clusterThreshold_</i>
  1926. ,
  1927. as the number&#160; of&#160; pixels&#160; each cluster&#160; must
  1928. exceed
  1929. the cluster threshold to be considered valid. <i>SmoothingThreshold_</i>
  1930. eliminates noise in the&#160; second derivative of the histogram. As
  1931. the
  1932. value is&#160; increased, you can&#160; expect&#160; a&#160; smoother
  1933. second derivative.&#160; The default is 1.5.
  1934. </font>
  1935. </td>
  1936. </tr>
  1937. <tr>
  1938. <td style="text-align: center;">
  1939. <center><a name="shade"></a> <font size="-1">shade</font></center>
  1940. </td>
  1941. <td>
  1942. <font size="-1">double azimuth_ = 30, double elevation_ = 30,</font>
  1943. <br />
  1944. <font size="-1">bool colorShading_ = false</font>
  1945. </td>
  1946. <td>
  1947. <font size="-1">
  1948. Shade image using distant light source.
  1949. Specify <i> azimuth_</i> and <i>elevation_</i> as the&#160;
  1950. position&#160; of&#160; the light source. By default, the shading
  1951. results as a grayscale image.. Set c<i>olorShading_</i> to <i>true</i>
  1952. to
  1953. shade the red, green, and blue components of the image.
  1954. </font>
  1955. </td>
  1956. </tr>
  1957. <tr>
  1958. <td style="text-align: center;">
  1959. <center><a name="shadow"></a> <font size="-1">shadow</font></center>
  1960. </td>
  1961. <td>
  1962. <font size="-1">
  1963. const double percent_opacity = 80, const double sigma_
  1964. = 0.5, const ssize_t x_ = 0, const ssize_t y_ = 0
  1965. </font>
  1966. </td>
  1967. <td><font size="-1">simulate an image shadow</font></td>
  1968. </tr>
  1969. <tr>
  1970. <td style="text-align: center;">
  1971. <center><a name="sharpen"></a> <font size="-1">sharpen</font></center>
  1972. </td>
  1973. <td>
  1974. <font size="-1">
  1975. const double radius_ = 1, const double sigma_
  1976. = 0.5
  1977. </font>
  1978. </td>
  1979. <td>
  1980. <font size="-1">
  1981. Sharpen pixels in image.&#160; The <i>radius_</i>
  1982. parameter specifies the radius of the Gaussian, in pixels, not counting
  1983. the center pixel.&#160; The <i>sigma_</i> parameter specifies the
  1984. standard deviation of the Laplacian, in pixels.
  1985. </font>
  1986. </td>
  1987. </tr>
  1988. <tr>
  1989. <td style="vertical-align: middle; text-align: center;">
  1990. <small>
  1991. <a name="sharpenChannel"></a>sharpenChannel<br />
  1992. </small>
  1993. </td>
  1994. <td style="vertical-align: middle;">
  1995. <small>
  1996. const ChannelType
  1997. channel_, const double radius_ = 0.0, const double sigma_ = 1.0<br />
  1998. </small>
  1999. </td>
  2000. <td style="vertical-align: middle;">
  2001. <font size="-1">
  2002. Sharpen pixel
  2003. quantums in an image channel&#160; The <span style="font-style: italic;">channel_</span> parameter specifies the
  2004. channel to sharpen..&#160; The <i>radius_</i>
  2005. parameter specifies the radius of the Gaussian, in pixels, not counting
  2006. the center pixel.&#160; The <i>sigma_</i> parameter specifies the
  2007. standard deviation of the Laplacian, in pixels.
  2008. </font>
  2009. </td>
  2010. </tr>
  2011. <tr>
  2012. <td style="text-align: center;">
  2013. <center><a name="shave"></a> <font size="-1">shave</font></center>
  2014. </td>
  2015. <td><font size="-1">const Geometry &amp;geometry_</font></td>
  2016. <td><font size="-1">Shave pixels from image edges.</font></td>
  2017. </tr>
  2018. <tr>
  2019. <td style="text-align: center;">
  2020. <center><a name="shear"></a> <font size="-1">shear</font></center>
  2021. </td>
  2022. <td><font size="-1">double xShearAngle_, double yShearAngle_</font></td>
  2023. <td>
  2024. <font size="-1">
  2025. Shear image (create parallelogram by sliding
  2026. image by X or Y axis).&#160; Shearing slides one edge of an image along
  2027. the X&#160; or&#160; Y axis,&#160; creating&#160; a
  2028. parallelogram.&#160; An X direction shear slides an edge along the X
  2029. axis, while&#160; a&#160; Y&#160; direction shear&#160; slides&#160;
  2030. an edge along the Y axis.&#160; The amount of the shear is controlled
  2031. by a shear angle.&#160; For X direction&#160; shears,&#160; x&#160;
  2032. degrees is measured relative to the Y axis, and similarly, for Y
  2033. direction shears&#160; y&#160; degrees is measured relative to the X
  2034. axis. Empty triangles left over from shearing the&#160; image&#160; are
  2035. filled&#160; with&#160; the&#160; color&#160; defined as <i>borderColor</i>.&#160;
  2036. </font>
  2037. </td>
  2038. </tr>
  2039. <tr>
  2040. <td style="text-align: center;">
  2041. <center><a name="solarize"></a> <font size="-1">solarize</font></center>
  2042. </td>
  2043. <td><font size="-1">double factor_ = 50.0</font></td>
  2044. <td>
  2045. <font size="-1">
  2046. Solarize image (similar to effect seen when
  2047. exposing a photographic film to light during the development process)
  2048. </font>
  2049. </td>
  2050. </tr>
  2051. <tr>
  2052. <td style="text-align: center;">
  2053. <center><a name="splice"></a> <font size="-1">splice</font></center>
  2054. </td>
  2055. <td>
  2056. <font size="-1">
  2057. const <a href="Geometry.html">Geometry</a>
  2058. &amp;geometry_
  2059. </font>
  2060. </td>
  2061. <td><font size="-1">splice the background color into the image</font></td>
  2062. </tr>
  2063. <tr>
  2064. <td style="text-align: center;">
  2065. <center><a name="spread"></a> <font size="-1">spread</font></center>
  2066. </td>
  2067. <td><font size="-1">size_t amount_ = 3</font></td>
  2068. <td>
  2069. <font size="-1">
  2070. Spread pixels randomly within image by
  2071. specified amount
  2072. </font>
  2073. </td>
  2074. </tr>
  2075. <tr>
  2076. <td style="text-align: center;">
  2077. <center><a name="stegano"></a> <font size="-1">stegano</font></center>
  2078. </td>
  2079. <td><font size="-1">const Image &amp;watermark_</font></td>
  2080. <td>
  2081. <font size="-1">
  2082. Add a digital watermark to the image (based
  2083. on second image)
  2084. </font>
  2085. </td>
  2086. </tr>
  2087. <tr>
  2088. <td>
  2089. <center><a name="sparseColor"></a> <font size="-1">sparseColor</font></center>
  2090. </td>
  2091. <td><font size="-1">const ChannelType channel, const SparseColorMethod method, const size_t number_arguments, const double *arguments </font></td>
  2092. <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>
  2093. </tr>
  2094. <tr>
  2095. <td style="text-align: center;">
  2096. <center><a name="statistics"></a> <font size="-1">statistics</font></center>
  2097. </td>
  2098. <td><font size="-1">ImageStatistics *statistics</font></td>
  2099. <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>
  2100. </tr>
  2101. <tr>
  2102. <td style="text-align: center;">
  2103. <center><a name="stereo"></a> <font size="-1">stereo</font></center>
  2104. </td>
  2105. <td><font size="-1">const Image &amp;rightImage_</font></td>
  2106. <td>
  2107. <font size="-1">
  2108. Create an image which appears in stereo when
  2109. viewed with red-blue glasses (Red image on left, blue on right)
  2110. </font>
  2111. </td>
  2112. </tr>
  2113. <tr>
  2114. <td style="text-align: center;">
  2115. <center><a name="swirl"></a> <font size="-1">swirl</font></center>
  2116. </td>
  2117. <td><font size="-1">double degrees_</font></td>
  2118. <td>
  2119. <font size="-1">
  2120. Swirl image (image pixels are rotated by
  2121. degrees)
  2122. </font>
  2123. </td>
  2124. </tr>
  2125. <tr>
  2126. <td style="text-align: center;">
  2127. <center><a name="texture"></a> <font size="-1">texture</font></center>
  2128. </td>
  2129. <td><font size="-1">const Image &amp;texture_</font></td>
  2130. <td>
  2131. <font size="-1">
  2132. Layer a texture on pixels matching image
  2133. background color.
  2134. </font>
  2135. </td>
  2136. </tr>
  2137. <tr>
  2138. <td style="text-align: center;">
  2139. <center><a name="threshold"></a> <font size="-1">threshold</font></center>
  2140. </td>
  2141. <td><font size="-1">double threshold_</font></td>
  2142. <td><font size="-1">Threshold image</font></td>
  2143. </tr>
  2144. <tr>
  2145. <td style="text-align: center;" rowspan="2">
  2146. <center><a name="transform"></a> <font size="-1">transform</font></center>
  2147. </td>
  2148. <td>
  2149. <font size="-1">
  2150. const <a href="Geometry.html">Geometry</a>
  2151. &amp;imageGeometry_
  2152. </font>
  2153. </td>
  2154. <td rowspan="2">
  2155. <font size="-1">
  2156. Transform image based on image
  2157. and crop geometries. Crop geometry is optional.
  2158. </font>
  2159. </td>
  2160. </tr>
  2161. <tr>
  2162. <td>
  2163. <font size="-1">
  2164. const <a href="Geometry.html">Geometry</a>
  2165. &amp;imageGeometry_, const <a href="Geometry.html">Geometry</a>
  2166. &amp;cropGeometry_&#160;
  2167. </font>
  2168. </td>
  2169. </tr>
  2170. <tr>
  2171. <td style="text-align: center;">
  2172. <center><a name="transparent"></a> <font size="-1">transparent</font></center>
  2173. </td>
  2174. <td>
  2175. <font size="-1">
  2176. const <a href="Color.html">Color</a>
  2177. &amp;color_
  2178. </font>
  2179. </td>
  2180. <td>
  2181. <font size="-1">
  2182. Add alpha image to image, setting pixels
  2183. matching color to transparent.
  2184. </font>
  2185. </td>
  2186. </tr>
  2187. <tr>
  2188. <td style="text-align: center;">
  2189. <center><a name="trim"></a> <font size="-1">trim</font></center>
  2190. </td>
  2191. <td><font size="-1">void</font></td>
  2192. <td>
  2193. <font size="-1">
  2194. Trim edges that are the background color from
  2195. the image.
  2196. </font>
  2197. </td>
  2198. </tr>
  2199. <tr>
  2200. <td style="text-align: center;">
  2201. <center><a name="unsharpmask"></a> <font size="-1">unsharpmask</font></center>
  2202. </td>
  2203. <td>
  2204. <font size="-1">
  2205. double radius_, double sigma_, double
  2206. amount_, double threshold_
  2207. </font>
  2208. </td>
  2209. <td>
  2210. <font size="-1">
  2211. Sharpen the image using the unsharp mask
  2212. algorithm. The <i>radius</i>_
  2213. parameter specifies the radius of the Gaussian, in pixels, not
  2214. counting the center pixel. The <i>sigma</i>_ parameter specifies the
  2215. standard deviation of the Gaussian, in pixels. The <i>amount</i>_
  2216. parameter specifies the percentage of the difference between the
  2217. original and the blur image that is added back into the original. The <i>threshold</i>_
  2218. parameter specifies the threshold in pixels needed to apply the
  2219. diffence amount.
  2220. </font>
  2221. </td>
  2222. </tr>
  2223. <tr>
  2224. <td style="vertical-align: middle; text-align: center;">
  2225. <small>
  2226. <a name="unsharpmaskChannel"></a>unsharpmaskChannel<br />
  2227. </small>
  2228. </td>
  2229. <td style="vertical-align: middle;">
  2230. <small>
  2231. const ChannelType
  2232. channel_, const double radius_, const double sigma_, const double
  2233. amount_, const double threshold_<br />
  2234. </small>
  2235. </td>
  2236. <td style="vertical-align: middle;">
  2237. <small>
  2238. Sharpen an image
  2239. channel using the unsharp mask algorithm. The <span style="font-style: italic;">channel_</span> parameter specifies the
  2240. channel to sharpen.
  2241. </small><font size="-1">
  2242. The <i>radius</i>_
  2243. parameter specifies the radius of the Gaussian, in pixels, not
  2244. counting the center pixel. The <i>sigma</i>_ parameter specifies the
  2245. standard deviation of the Gaussian, in pixels. The <i>amount</i>_
  2246. parameter specifies the percentage of the difference between the
  2247. original and the blur image that is added back into the original. The <i>threshold</i>_
  2248. parameter specifies the threshold in pixels needed to apply the
  2249. diffence amount.
  2250. </font>
  2251. </td>
  2252. </tr>
  2253. <tr>
  2254. <td style="text-align: center;">
  2255. <center><a name="wave"></a> <font size="-1">wave</font></center>
  2256. </td>
  2257. <td>
  2258. <font size="-1">
  2259. double amplitude_ = 25.0, double wavelength_
  2260. = 150.0
  2261. </font>
  2262. </td>
  2263. <td><font size="-1">Alter an image along a sine wave.</font></td>
  2264. </tr>
  2265. <tr>
  2266. <td style="text-align: center;" rowspan="5">
  2267. <center><a name="write"></a> <font size="-1">write</font></center>
  2268. </td>
  2269. <td><font size="-1">const string &amp;imageSpec_</font></td>
  2270. <td>
  2271. <font size="-1">
  2272. Write image to a file using filename i<i>mageSpec_</i>
  2273. .
  2274. </font> <br />
  2275. <font size="-1">
  2276. <b><font color="#ff0000">Caution: </font></b> if
  2277. an image format is selected which is capable of supporting fewer
  2278. colors than the original image or quantization has been requested, the
  2279. original image will be quantized to fewer colors. Use a copy of the
  2280. original if this is a problem.
  2281. </font>
  2282. </td>
  2283. </tr>
  2284. <tr>
  2285. <td><font size="-1"><a href="Blob.html">Blob</a> *blob_</font></td>
  2286. <td rowspan="3">
  2287. <font size="-1">
  2288. Write image to a in-memory <a href="Blob.html">BLOB</a> stored in <i>blob_</i>. The <i>magick</i>_
  2289. parameter specifies the image format to write (defaults to <a href="Image++.html#magick">magick</a> ). The depth_ parameter species the image
  2290. depth (defaults to <a href="Image++.html#depth"> depth</a> ).
  2291. </font> <br />
  2292. <font size="-1">
  2293. <b><font color="#ff0000">Caution: </font></b> if
  2294. an image format is selected which is capable of supporting fewer
  2295. colors than the original image or quantization has been requested, the
  2296. original image will be quantized to fewer colors. Use a copy of the
  2297. original if this is a problem.
  2298. </font>
  2299. </td>
  2300. </tr>
  2301. <tr>
  2302. <td>
  2303. <font size="-1">
  2304. <a href="Blob.html">Blob</a> *blob_,
  2305. std::string &amp;magick_
  2306. </font>
  2307. </td>
  2308. </tr>
  2309. <tr>
  2310. <td>
  2311. <font size="-1">
  2312. <a href="Blob.html">Blob</a> *blob_,
  2313. std::string &amp;magick_, size_t depth_
  2314. </font>
  2315. </td>
  2316. </tr>
  2317. <tr>
  2318. <td>
  2319. <font size="-1">
  2320. const ssize_t x_, const ssize_t y_, const size_t
  2321. columns_, const size_t rows_, const std::string &amp;map_,
  2322. const StorageType type_, void *pixels_
  2323. </font>
  2324. </td>
  2325. <td>
  2326. <font size="-1">
  2327. Write pixel data into a buffer you supply.
  2328. The data is saved either as char, short int, integer, float or double
  2329. format in the order specified by the type_ parameter. For example, we
  2330. want to extract scanline 1 of a 640x480 image as character data in
  2331. red-green-blue order:
  2332. </font>
  2333. <p>
  2334. <font size="-1">&#160; image.write(0,0,640,1,"RGB",0,pixels);</font>
  2335. </p>
  2336. <p>
  2337. <font size="-1">The parameters are as follows:</font> <br />
  2338. &#160;
  2339. </p>
  2340. <table border="0" width="100%">
  2341. <tbody>
  2342. <tr>
  2343. <td><font size="-1">x_</font></td>
  2344. <td>
  2345. <font size="-1">
  2346. Horizontal ordinate of left-most
  2347. coordinate of region to extract.
  2348. </font>
  2349. </td>
  2350. </tr>
  2351. <tr>
  2352. <td><font size="-1">y_</font></td>
  2353. <td>
  2354. <font size="-1">
  2355. Vertical ordinate of top-most
  2356. coordinate of region to extract.
  2357. </font>
  2358. </td>
  2359. </tr>
  2360. <tr>
  2361. <td><font size="-1">columns_</font></td>
  2362. <td>
  2363. <font size="-1">
  2364. Width in pixels of the region to
  2365. extract.
  2366. </font>
  2367. </td>
  2368. </tr>
  2369. <tr>
  2370. <td><font size="-1">rows_</font></td>
  2371. <td>
  2372. <font size="-1">
  2373. Height in pixels of the region to
  2374. extract.
  2375. </font>
  2376. </td>
  2377. </tr>
  2378. <tr>
  2379. <td><font size="-1">map_</font></td>
  2380. <td>
  2381. <font size="-1">
  2382. This character string can be any
  2383. combination or order of R = red, G = green, B = blue, A = alpha, C =
  2384. cyan, Y = yellow, M = magenta, and K = black. The ordering reflects
  2385. the order of the pixels in the supplied pixel array.
  2386. </font>
  2387. </td>
  2388. </tr>
  2389. <tr>
  2390. <td><font size="-1">type_</font></td>
  2391. <td>
  2392. <font size="-1">
  2393. Pixel storage type (CharPixel,
  2394. ShortPixel, IntegerPixel, FloatPixel, or DoublePixel)
  2395. </font>
  2396. </td>
  2397. </tr>
  2398. <tr>
  2399. <td><font size="-1">pixels_</font></td>
  2400. <td>
  2401. <font size="-1">
  2402. This array of values contain the pixel
  2403. components as defined by the map_ and type_ parameters. The length of
  2404. the arrays must equal the area specified by the width_ and height_
  2405. values and type_ parameters.
  2406. </font>
  2407. </td>
  2408. </tr>
  2409. </tbody>
  2410. </table>
  2411. </td>
  2412. </tr>
  2413. <tr>
  2414. <td style="text-align: center;">
  2415. <center><a name="resize"></a> <font size="-1">resize</font></center>
  2416. </td>
  2417. <td>
  2418. <font size="-1">
  2419. const <a href="Geometry.html">Geometry</a>
  2420. &amp;geometry_
  2421. </font>
  2422. </td>
  2423. <td><font size="-1">Resize image to specified size.</font></td>
  2424. </tr>
  2425. </tbody>
  2426. </table>
  2427. <center>
  2428. <h3> <a name="Image Attributes"></a> Image Attributes</h3>
  2429. </center>
  2430. Image attributes are set and obtained via methods in Image. Except for
  2431. methods which accept pointer arguments (e.g. c<tt>hromaBluePrimary)</tt>
  2432. all methods return attributes by value.
  2433. <p>
  2434. Image attributes are easily used. For example, to set the resolution
  2435. of the TIFF file "file.tiff" to 150 dots-per-inch (DPI) in both the
  2436. horizontal and vertical directions, you can use the following example
  2437. code:
  2438. </p>
  2439. <pre class="code">
  2440. string filename("file.tiff");
  2441. Image image;
  2442. image.read(filename);
  2443. image.resolutionUnits(PixelsPerInchResolution);
  2444. image.density(Geometry(150,150)); // could also use image.density("150x150")
  2445. image.write(filename)
  2446. </pre>
  2447. The supported image attributes and the method arguments required to
  2448. obtain them are shown in the following table: <br />
  2449. &#160;
  2450. <table border="1">
  2451. <caption>Image Attributes</caption>
  2452. <tbody>
  2453. <tr>
  2454. <td>
  2455. <center><b>Function</b></center>
  2456. </td>
  2457. <td>
  2458. <center><b>Type</b></center>
  2459. </td>
  2460. <td>
  2461. <center><b>Get Signature</b></center>
  2462. </td>
  2463. <td>
  2464. <center><b>Set Signature</b></center>
  2465. </td>
  2466. <td>
  2467. <center><b>Description</b></center>
  2468. </td>
  2469. </tr>
  2470. <tr>
  2471. <td>
  2472. <center><a name="adjoin"></a> <font size="-1">adjoin</font></center>
  2473. </td>
  2474. <td><font size="-1">bool</font></td>
  2475. <td><font size="-1">void</font></td>
  2476. <td><font size="-1">bool flag_</font></td>
  2477. <td><font size="-1">Join images into a single multi-image file.</font></td>
  2478. </tr>
  2479. <tr>
  2480. <td>
  2481. <center><a name="antiAlias"></a> <font size="-1">antiAlias</font></center>
  2482. </td>
  2483. <td><font size="-1">bool</font></td>
  2484. <td><font size="-1">void</font></td>
  2485. <td><font size="-1">bool flag_</font></td>
  2486. <td>
  2487. <font size="-1">
  2488. Control antialiasing of rendered Postscript
  2489. and Postscript or TrueType fonts. Enabled by default.
  2490. </font>
  2491. </td>
  2492. </tr>
  2493. <tr>
  2494. <td>
  2495. <center>
  2496. <a name="animationDelay"></a> <font size="-1">animation-</font>
  2497. <br />
  2498. <font size="-1">Delay</font>
  2499. </center>
  2500. </td>
  2501. <td><font size="-1">size_t (0 to 65535)</font></td>
  2502. <td><font size="-1">void</font></td>
  2503. <td><font size="-1">size_t delay_</font></td>
  2504. <td>
  2505. <font size="-1">
  2506. Time in 1/100ths of a second (0 to 65535)
  2507. which must expire before displaying the next image in an animated
  2508. sequence. This option is useful for regulating the animation of a
  2509. sequence&#160; of GIF images within Netscape.
  2510. </font>
  2511. </td>
  2512. </tr>
  2513. <tr>
  2514. <td>
  2515. <center>
  2516. <a name="animationIterations"></a> <font size="-1">animation-</font>
  2517. <br />
  2518. <font size="-1">Iterations</font>
  2519. </center>
  2520. </td>
  2521. <td><font size="-1">size_t</font></td>
  2522. <td><font size="-1">void</font></td>
  2523. <td><font size="-1">size_t iterations_</font></td>
  2524. <td>
  2525. <font size="-1">
  2526. Number of iterations to loop an animation
  2527. (e.g. Netscape loop extension) for.
  2528. </font>
  2529. </td>
  2530. </tr>
  2531. <tr>
  2532. <td style="vertical-align: middle; text-align: center;">
  2533. <small>
  2534. <a name="attribute"></a>attribute<br />
  2535. </small>
  2536. </td>
  2537. <td style="vertical-align: middle;">
  2538. <small>
  2539. string<br />
  2540. </small>
  2541. </td>
  2542. <td style="vertical-align: top;" valign="top">
  2543. <small>
  2544. const
  2545. std::string name_<br />
  2546. </small>
  2547. </td>
  2548. <td style="vertical-align: top;" valign="top">
  2549. <small>
  2550. const
  2551. std::string name_, const std::string value_
  2552. </small>
  2553. </td>
  2554. <td style="vertical-align: middle;">
  2555. <small>
  2556. An arbitrary named
  2557. image attribute. Any number of named attributes may be attached to the
  2558. image. For example, the image comment is a named image attribute with
  2559. the name "comment". EXIF tags are attached to the image as named
  2560. attributes. Use the syntax "EXIF:&lt;tag&gt;" to request an EXIF tag
  2561. similar to "EXIF:DateTime".
  2562. </small><br />
  2563. </td>
  2564. </tr>
  2565. <tr>
  2566. <td>
  2567. <center>
  2568. <a name="backgroundColor"></a> <font size="-1">background-</font>
  2569. <br />
  2570. <font size="-1">Color</font>
  2571. </center>
  2572. </td>
  2573. <td><font size="-1"><a href="Color.html">Color</a> </font></td>
  2574. <td><font size="-1">void</font></td>
  2575. <td>
  2576. <font size="-1">
  2577. const <a href="Color.html">Color</a>
  2578. &amp;color_
  2579. </font>
  2580. </td>
  2581. <td><font size="-1">Image background color</font></td>
  2582. </tr>
  2583. <tr>
  2584. <td>
  2585. <center>
  2586. <a name="backgroundTexture"></a> <font size="-1">background-</font>
  2587. <br />
  2588. <font size="-1">Texture</font>
  2589. </center>
  2590. </td>
  2591. <td><font size="-1">string</font></td>
  2592. <td><font size="-1">void</font></td>
  2593. <td><font size="-1">const string &amp;texture_</font></td>
  2594. <td>
  2595. <font size="-1">
  2596. Image file name to use as the background
  2597. texture. Does not modify image pixels.
  2598. </font>
  2599. </td>
  2600. </tr>
  2601. <tr>
  2602. <td>
  2603. <center><a name="baseColumns"></a> <font size="-1">baseColumns</font></center>
  2604. </td>
  2605. <td><font size="-1">size_t</font></td>
  2606. <td><font size="-1">void</font></td>
  2607. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  2608. <td><font size="-1">Base image width (before transformations)</font></td>
  2609. </tr>
  2610. <tr>
  2611. <td>
  2612. <center><a name="baseFilename"></a> <font size="-1">baseFilename</font></center>
  2613. </td>
  2614. <td><font size="-1">string</font></td>
  2615. <td><font size="-1">void</font></td>
  2616. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  2617. <td><font size="-1">Base image filename (before transformations)</font></td>
  2618. </tr>
  2619. <tr>
  2620. <td>
  2621. <center><a name="baseRows"></a> <font size="-1">baseRows</font></center>
  2622. </td>
  2623. <td><font size="-1">size_t</font></td>
  2624. <td><font size="-1">void</font></td>
  2625. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  2626. <td><font size="-1">Base image height (before transformations)</font></td>
  2627. </tr>
  2628. <tr>
  2629. <td>
  2630. <center><a name="borderColor"></a> <font size="-1">borderColor</font></center>
  2631. </td>
  2632. <td><font size="-1"><a href="Color.html">Color</a> </font></td>
  2633. <td><font size="-1">void</font></td>
  2634. <td>
  2635. <font size="-1">
  2636. &#160;const <a href="Color.html">Color</a>
  2637. &amp;color_
  2638. </font>
  2639. </td>
  2640. <td><font size="-1">Image border color</font></td>
  2641. </tr>
  2642. <tr>
  2643. <td style="vertical-align: middle;" valign="middle"><small><a name="boundingBox"></a>boundingBox<br /> </small></td>
  2644. <td><font size="-1">Geometry</font></td>
  2645. <td><font size="-1">void</font></td>
  2646. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  2647. <td>
  2648. <font size="-1">
  2649. Return smallest bounding box enclosing
  2650. non-border pixels. The current fuzz value is used when discriminating
  2651. between pixels. This is the crop bounding box used by
  2652. crop(Geometry(0,0)).
  2653. </font>
  2654. </td>
  2655. </tr>
  2656. <tr>
  2657. <td>
  2658. <center><a name="boxColor"></a> <font size="-1">boxColor</font></center>
  2659. </td>
  2660. <td><font size="-1"><a href="Color.html">Color</a> </font></td>
  2661. <td><font size="-1">void</font></td>
  2662. <td>
  2663. <font size="-1">
  2664. const <a href="Color.html">Color</a>
  2665. &amp;boxColor_
  2666. </font>
  2667. </td>
  2668. <td>
  2669. <font size="-1">
  2670. Base color that annotation text is rendered
  2671. on.
  2672. </font>
  2673. </td>
  2674. </tr>
  2675. <tr>
  2676. <td><a name="cacheThreshold"></a> <font size="-1">cacheThreshold</font></td>
  2677. <td><font size="-1">size_t</font></td>
  2678. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  2679. <td><font size="-1">const size_t</font></td>
  2680. <td>
  2681. <font size="-1">
  2682. Pixel cache threshold in bytes. Once this
  2683. threshold is exceeded, all subsequent pixels cache operations are
  2684. to/from disk. This is a static method and the attribute it sets is
  2685. shared by all Image objects.
  2686. </font>
  2687. </td>
  2688. </tr>
  2689. <tr>
  2690. <td style="vertical-align: middle;" valign="middle">
  2691. <small>
  2692. <a name="channelDepth"></a>channelDepth<br />
  2693. </small>
  2694. </td>
  2695. <td style="vertical-align: middle;" valign="middle">
  2696. <small>
  2697. size_t
  2698. <br />
  2699. </small>
  2700. </td>
  2701. <td style="vertical-align: middle;" valign="middle">
  2702. <small>
  2703. const
  2704. ChannelType channel_<br />
  2705. </small>
  2706. </td>
  2707. <td style="vertical-align: middle;">
  2708. <small>
  2709. const ChannelType
  2710. channel_, const size_t depth_<br />
  2711. </small>
  2712. </td>
  2713. <td style="vertical-align: middle;">
  2714. <small>
  2715. Channel modulus depth.
  2716. The channel modulus depth represents the minimum number of bits
  2717. required
  2718. to support the channel without loss. Setting the channel's modulus
  2719. depth
  2720. modifies the channel (i.e. discards resolution) if the requested
  2721. modulus
  2722. depth is less than the current modulus depth, otherwise the channel is
  2723. not altered. There is no attribute associated with the modulus depth so
  2724. the current modulus depth is obtained by inspecting the pixels. As a
  2725. result, the depth returned may be less than the most recently set
  2726. channel depth. Subsequent image processing may result in increasing the
  2727. channel depth.<br />
  2728. </small>
  2729. </td>
  2730. </tr>
  2731. <tr>
  2732. <td style="vertical-align: middle;" valign="middle"><small><a name="channels"></a>channels<br /> </small></td>
  2733. <td><font size="-1">size_t</font></td>
  2734. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  2735. <td><font size="-1">const size_t</font></td>
  2736. <td><font size="-1">NUmber of pixel channels.</font></td>
  2737. </tr>
  2738. <tr>
  2739. <td>
  2740. <center>
  2741. <a name="chromaBluePrimary"></a> <font size="-1">chroma-</font>
  2742. <br />
  2743. <font size="-1">BluePrimary</font>
  2744. </center>
  2745. </td>
  2746. <td><font size="-1">double x &amp; y</font></td>
  2747. <td><font size="-1">double *x_, double *y_</font></td>
  2748. <td><font size="-1">double x_, double y_</font></td>
  2749. <td>
  2750. <font size="-1">
  2751. Chromaticity blue primary point (e.g. x=0.15,
  2752. y=0.06)
  2753. </font>
  2754. </td>
  2755. </tr>
  2756. <tr>
  2757. <td>
  2758. <center>
  2759. <a name="chromaGreenPrimary"></a> <font size="-1">chroma-</font>
  2760. <br />
  2761. <font size="-1">GreenPrimary</font>
  2762. </center>
  2763. </td>
  2764. <td><font size="-1">double x &amp; y</font></td>
  2765. <td><font size="-1">double *x_, double *y_</font></td>
  2766. <td><font size="-1">double x_, double y_</font></td>
  2767. <td>
  2768. <font size="-1">
  2769. Chromaticity green primary point (e.g. x=0.3,
  2770. y=0.6)
  2771. </font>
  2772. </td>
  2773. </tr>
  2774. <tr>
  2775. <td>
  2776. <center>
  2777. <a name="chromaRedPrimary"></a> <font size="-1">chroma-</font>
  2778. <br />
  2779. <font size="-1">RedPrimary</font>
  2780. </center>
  2781. </td>
  2782. <td><font size="-1">double x &amp; y</font></td>
  2783. <td><font size="-1">double *x_, double *y_</font></td>
  2784. <td><font size="-1">double x_, double y_</font></td>
  2785. <td>
  2786. <font size="-1">
  2787. Chromaticity red primary point (e.g. x=0.64,
  2788. y=0.33)
  2789. </font>
  2790. </td>
  2791. </tr>
  2792. <tr>
  2793. <td>
  2794. <center>
  2795. <a name="chromaWhitePoint"></a> <font size="-1">chroma-</font>
  2796. <br />
  2797. <font size="-1">WhitePoint</font>
  2798. </center>
  2799. </td>
  2800. <td><font size="-1">double x &amp; y</font></td>
  2801. <td><font size="-1">double*x_, double *y_</font></td>
  2802. <td><font size="-1">double x_, double y_</font></td>
  2803. <td>
  2804. <font size="-1">
  2805. Chromaticity white point (e.g. x=0.3127,
  2806. y=0.329)
  2807. </font>
  2808. </td>
  2809. </tr>
  2810. <tr>
  2811. <td>
  2812. <center><a name="classType"></a> <font size="-1">classType</font></center>
  2813. </td>
  2814. <td>
  2815. <font size="-1">
  2816. <a href="https://imagemagick.org/Magick++/Enumerations.html#ClassType">ClassType</a>
  2817. </font>
  2818. </td>
  2819. <td><font size="-1">void</font></td>
  2820. <td>
  2821. <font size="-1">
  2822. &#160;<a href="https://imagemagick.org/Magick++/Enumerations.html#ClassType">ClassType</a>
  2823. class_
  2824. </font>
  2825. </td>
  2826. <td>
  2827. <font size="-1">
  2828. Image storage class.&#160; Note that
  2829. conversion from a DirectClass image to a PseudoClass image may result
  2830. in a loss of color due to the limited size of the palette (256 or
  2831. 65535 colors).
  2832. </font>
  2833. </td>
  2834. </tr>
  2835. <tr>
  2836. <td>
  2837. <center><a name="clipMask"></a> <font size="-1">clipMask</font></center>
  2838. </td>
  2839. <td><font size="-1">Image</font></td>
  2840. <td><font size="-1">void</font></td>
  2841. <td><font size="-1">const Image &amp;clipMask_</font></td>
  2842. <td>
  2843. <font size="-1">
  2844. Associate a clip mask image with the current
  2845. image. The clip mask image must have the same dimensions as the current
  2846. image or an exception is thrown. Clipping occurs wherever pixels are
  2847. transparent in the clip mask image. Clipping Pass an invalid image to
  2848. unset an existing clip mask.
  2849. </font>
  2850. </td>
  2851. </tr>
  2852. <tr>
  2853. <td>
  2854. <center><a name="colorFuzz"></a> <font size="-1">colorFuzz</font></center>
  2855. </td>
  2856. <td><font size="-1">double</font></td>
  2857. <td><font size="-1">void</font></td>
  2858. <td><font size="-1">double fuzz_</font></td>
  2859. <td>
  2860. <font size="-1">
  2861. Colors within this distance are considered
  2862. equal. A number of algorithms search for a target&#160; color. By
  2863. default the color must be exact. Use this option to match colors that
  2864. are close to the target color in RGB space.
  2865. </font>
  2866. </td>
  2867. </tr>
  2868. <tr>
  2869. <td>
  2870. <center><a name="colorMap"></a> <font size="-1">colorMap</font></center>
  2871. </td>
  2872. <td><font size="-1"><a href="Color.html">Color</a> </font></td>
  2873. <td><font size="-1">size_t index_</font></td>
  2874. <td>
  2875. <font size="-1">
  2876. size_t index_, const <a href="Color.html">Color</a> &amp;color_
  2877. </font>
  2878. </td>
  2879. <td><font size="-1">Color at colormap index.</font></td>
  2880. </tr>
  2881. <tr>
  2882. <td valign="middle">
  2883. <div style="text-align:center">
  2884. <a name="colorMapSize"></a> <font size="-1">
  2885. colorMapSize<br />
  2886. </font>
  2887. </div>
  2888. </td>
  2889. <td valign="middle">
  2890. <font size="-1">
  2891. size_t<br />
  2892. </font>
  2893. </td>
  2894. <td valign="middle">
  2895. <font size="-1">
  2896. void<br />
  2897. </font>
  2898. </td>
  2899. <td valign="middle">
  2900. <font size="-1">
  2901. size_t entries_<br />
  2902. </font>
  2903. </td>
  2904. <td valign="middle">
  2905. <font size="-1">
  2906. Number of entries in the
  2907. colormap. Setting the colormap size may extend or truncate the
  2908. colormap.
  2909. The maximum number of supported entries is specified by the <i>MaxColormapSize</i>constant,
  2910. and is dependent on the value of QuantumDepth when ImageMagick is
  2911. compiled. An exception is thrown if more entries are requested than may
  2912. be supported. Care should be taken when truncating the colormap to
  2913. ensure that the image colormap indexes reference valid colormap entries.
  2914. </font><br />
  2915. </td>
  2916. </tr>
  2917. <tr>
  2918. <td>
  2919. <center><a name="colorSpace"></a> <font size="-1">colorSpace</font></center>
  2920. </td>
  2921. <td>
  2922. <font size="-1">
  2923. <a href="https://imagemagick.org/Magick++/Enumerations.html#ColorspaceType">ColorspaceType</a>
  2924. colorSpace_
  2925. </font>
  2926. </td>
  2927. <td><font size="-1">void</font></td>
  2928. <td>
  2929. <font size="-1">
  2930. <a href="https://imagemagick.org/Magick++/Enumerations.html#ColorspaceType">ColorspaceType</a>
  2931. colorSpace_
  2932. </font>
  2933. </td>
  2934. <td>
  2935. <font size="-1">
  2936. The colorspace (e.g. CMYK) used to represent
  2937. the image pixel colors. Image pixels are always stored as RGB(A) except
  2938. for the case of CMY(K).
  2939. </font>
  2940. </td>
  2941. </tr>
  2942. <tr>
  2943. <td>
  2944. <center><a name="columns"></a> <font size="-1">columns</font></center>
  2945. </td>
  2946. <td><font size="-1">size_t</font></td>
  2947. <td><font size="-1">void</font></td>
  2948. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  2949. <td><font size="-1">Image width</font></td>
  2950. </tr>
  2951. <tr>
  2952. <td>
  2953. <center><a name="comment"></a> <font size="-1">comment</font></center>
  2954. </td>
  2955. <td><font size="-1">string</font></td>
  2956. <td><font size="-1">void</font></td>
  2957. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  2958. <td><font size="-1">Image comment</font></td>
  2959. </tr>
  2960. <tr>
  2961. <td>
  2962. <center><a name="compose"></a> <font size="-1">compose</font></center>
  2963. </td>
  2964. <td>
  2965. <font size="-1">
  2966. <a href="https://imagemagick.org/Magick++/Enumerations.html#CompositeOperator">CompositeOperator</a>
  2967. </font>
  2968. </td>
  2969. <td><small><font size="-1"><small>void</small></font></small></td>
  2970. <td>
  2971. <small>
  2972. <font size="-1">
  2973. <small>
  2974. <a href="https://imagemagick.org/Magick++/Enumerations.html#CompositeOperator">CompositeOperator</a>
  2975. compose_
  2976. </small>
  2977. </font>
  2978. </small>
  2979. </td>
  2980. <td>
  2981. <font size="-1">
  2982. Composition operator to be used when
  2983. composition is implicitly used (such as for image flattening).
  2984. </font>
  2985. </td>
  2986. </tr>
  2987. <tr>
  2988. <td>
  2989. <center>
  2990. <a name="compressType"></a> <font size="-1">compress-</font>
  2991. <br />
  2992. <font size="-1">Type</font>
  2993. </center>
  2994. </td>
  2995. <td>
  2996. <font size="-1">
  2997. <a href="https://imagemagick.org/Magick++/Enumerations.html#CompressionType">CompressionType</a>
  2998. </font>
  2999. </td>
  3000. <td><small><font size="-1"><small>void</small></font></small></td>
  3001. <td>
  3002. <small>
  3003. <font size="-1">
  3004. <small>
  3005. <a href="https://imagemagick.org/Magick++/Enumerations.html#CompressionType">CompressionType</a>
  3006. compressType_
  3007. </small>
  3008. </font>
  3009. </small>
  3010. </td>
  3011. <td>
  3012. <font size="-1">
  3013. Image compresion type. The default is the
  3014. compression type of the specified image file.
  3015. </font>
  3016. </td>
  3017. </tr>
  3018. <tr>
  3019. <td>
  3020. <center><a name="debug"></a> <font size="-1">debug</font></center>
  3021. </td>
  3022. <td><font size="-1">bool</font></td>
  3023. <td><small><font size="-1"><small>void</small></font></small></td>
  3024. <td><small><font size="-1"><small>bool flag_</small></font></small></td>
  3025. <td>
  3026. <font size="-1">
  3027. Enable printing of internal debug messages
  3028. from ImageMagick as it executes.
  3029. </font>
  3030. </td>
  3031. </tr>
  3032. <tr>
  3033. <td style="text-align: center; vertical-align: middle;">
  3034. <small>
  3035. <a name="defineValue"></a>defineValue<br />
  3036. </small>
  3037. </td>
  3038. <td style="vertical-align: middle; text-align: left;">
  3039. <small>
  3040. string<br />
  3041. </small>
  3042. </td>
  3043. <td style="vertical-align: middle;">
  3044. <small>
  3045. const std::string
  3046. &amp;magick_, const std::string &amp;key_<br />
  3047. </small>
  3048. </td>
  3049. <td style="vertical-align: middle;">
  3050. <small>
  3051. const std::string
  3052. &amp;magick_, const std::string &amp;key_, &#160;const std::string
  3053. &amp;value_<br />
  3054. </small>
  3055. </td>
  3056. <td style="vertical-align: top;">
  3057. <small>
  3058. Set or obtain a
  3059. definition string to applied when encoding or decoding the specified
  3060. format. The meanings of the definitions are format specific. The format
  3061. is designated by the <span style="font-style: italic;">magick_</span>
  3062. argument, the format-specific key is designated by <span style="font-style: italic;">key_</span>, and the associated value is
  3063. specified by <span style="font-style: italic;">value_</span>. See the
  3064. defineSet() method if the key must be removed entirely.
  3065. </small><br />
  3066. </td>
  3067. </tr>
  3068. <tr>
  3069. <td style="text-align: center; vertical-align: middle;">
  3070. <small>
  3071. <a name="defineSet"></a>defineSet<br />
  3072. </small>
  3073. </td>
  3074. <td style="vertical-align: middle; text-align: left;">
  3075. <small>
  3076. bool<br />
  3077. </small>
  3078. </td>
  3079. <td style="vertical-align: middle;">
  3080. <small>
  3081. const std::string
  3082. &amp;magick_, const std::string &amp;key_<br />
  3083. </small>
  3084. </td>
  3085. <td style="vertical-align: middle;">
  3086. <small>
  3087. const std::string
  3088. &amp;magick_, const std::string &amp;key_, bool flag_<br />
  3089. </small>
  3090. </td>
  3091. <td style="vertical-align: middle;">
  3092. <small>
  3093. Set or obtain a
  3094. definition flag to applied when encoding or decoding the specified
  3095. format.
  3096. </small><small>
  3097. . Similar to the defineValue() method except that
  3098. passing the <span style="font-style: italic;">flag_</span> value
  3099. 'true'
  3100. creates a value-less define with that format and key. Passing the <span style="font-style: italic;">f</span><span style="font-style: italic;">lag_</span>
  3101. value 'false' removes any existing matching definition. The method
  3102. returns 'true' if a matching key exists, and 'false' if no matching key
  3103. exists.<br />
  3104. </small>
  3105. </td>
  3106. </tr>
  3107. <tr>
  3108. <td>
  3109. <center><a name="density"></a> <font size="-1">density</font></center>
  3110. </td>
  3111. <td>
  3112. <font size="-1">
  3113. <a href="Geometry.html">Geometry</a> &#160;
  3114. (default 72x72)
  3115. </font>
  3116. </td>
  3117. <td><font size="-1">void</font></td>
  3118. <td>
  3119. <font size="-1">
  3120. const <a href="Geometry.html">Geometry</a>
  3121. &amp;density_
  3122. </font>
  3123. </td>
  3124. <td>
  3125. <font size="-1">
  3126. Vertical and horizontal resolution in pixels
  3127. of the image. This option specifies an image density when decoding a
  3128. Postscript or Portable Document page. Often used with <i>psPageSize</i>.
  3129. </font>
  3130. </td>
  3131. </tr>
  3132. <tr>
  3133. <td>
  3134. <center><a name="depth"></a> <font size="-1">depth</font></center>
  3135. </td>
  3136. <td><font size="-1">&#160;size_t (8-32)</font></td>
  3137. <td><font size="-1">void</font></td>
  3138. <td><font size="-1">size_t depth_</font></td>
  3139. <td>
  3140. <font size="-1">
  3141. Image depth. Used to specify the bit depth
  3142. when reading or writing&#160; raw images or when the output format
  3143. supports multiple depths. Defaults to the quantum depth that
  3144. ImageMagick is compiled with.
  3145. </font>
  3146. </td>
  3147. </tr>
  3148. <tr>
  3149. <td>
  3150. <center><a name="endian"></a> <font size="-1">endian</font></center>
  3151. </td>
  3152. <td>
  3153. <font size="-1">
  3154. <a href="https://imagemagick.org/Magick++/Enumerations.html#EndianType">EndianType</a>
  3155. </font>
  3156. </td>
  3157. <td><font size="-1">void</font></td>
  3158. <td>
  3159. <font size="-1">
  3160. <a href="https://imagemagick.org/Magick++/Enumerations.html#EndianType">EndianType</a>
  3161. endian_
  3162. </font>
  3163. </td>
  3164. <td>
  3165. <font size="-1">
  3166. Specify (or obtain) endian option for formats
  3167. which support it.
  3168. </font>
  3169. </td>
  3170. </tr>
  3171. <tr>
  3172. <td>
  3173. <center><a name="directory"></a> <font size="-1">directory</font></center>
  3174. </td>
  3175. <td><font size="-1">string</font></td>
  3176. <td><font size="-1">void</font></td>
  3177. <td><font size="-1">&#160;</font></td>
  3178. <td><font size="-1">Tile names from within an image montage</font></td>
  3179. </tr>
  3180. <tr>
  3181. <td>
  3182. <center><a name="file"></a> <font size="-1">file</font></center>
  3183. </td>
  3184. <td><font size="-1">FILE *</font></td>
  3185. <td><font size="-1">FILE *</font></td>
  3186. <td><font size="-1">FILE *file_</font></td>
  3187. <td><font size="-1">Image file descriptor.</font></td>
  3188. </tr>
  3189. <tr>
  3190. <td>
  3191. <center><a name="fileName"></a> <font size="-1">fileName</font></center>
  3192. </td>
  3193. <td><font size="-1">string</font></td>
  3194. <td><font size="-1">void</font></td>
  3195. <td><font size="-1">const string &amp;fileName_</font></td>
  3196. <td><font size="-1">Image file name.</font></td>
  3197. </tr>
  3198. <tr>
  3199. <td>
  3200. <center><a name="fileSize"></a> <font size="-1">fileSize</font></center>
  3201. </td>
  3202. <td><font size="-1">off_t</font></td>
  3203. <td><font size="-1">void</font></td>
  3204. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  3205. <td><font size="-1">Number of bytes of the image on disk</font></td>
  3206. </tr>
  3207. <tr>
  3208. <td>
  3209. <center><a name="fillColor"></a> <font size="-1">fillColor</font></center>
  3210. </td>
  3211. <td><font size="-1">Color</font></td>
  3212. <td><font size="-1">void</font></td>
  3213. <td><font size="-1">const Color &amp;fillColor_</font></td>
  3214. <td><font size="-1">Color to use when filling drawn objects</font></td>
  3215. </tr>
  3216. <tr>
  3217. <td>
  3218. <center><a name="fillPattern"></a> <font size="-1">fillPattern</font></center>
  3219. </td>
  3220. <td><font size="-1">Image</font></td>
  3221. <td><font size="-1">void</font></td>
  3222. <td><font size="-1">const Image &amp;fillPattern_</font></td>
  3223. <td>
  3224. <font size="-1">
  3225. Pattern image to use when filling drawn
  3226. objects.
  3227. </font>
  3228. </td>
  3229. </tr>
  3230. <tr>
  3231. <td>
  3232. <center><a name="fillRule"></a> <font size="-1">fillRule</font></center>
  3233. </td>
  3234. <td>
  3235. <font size="-1">
  3236. <a href="https://imagemagick.org/Magick++/Enumerations.html#FillRule">FillRule</a>
  3237. </font>
  3238. </td>
  3239. <td><font size="-1">void</font></td>
  3240. <td><font size="-1">const Magick::FillRule &amp;fillRule_</font></td>
  3241. <td><font size="-1">Rule to use when filling drawn objects.</font></td>
  3242. </tr>
  3243. <tr>
  3244. <td>
  3245. <center><a name="filterType"></a> <font size="-1">filterType</font></center>
  3246. </td>
  3247. <td>
  3248. <font size="-1">
  3249. <a href="https://imagemagick.org/Magick++/Enumerations.html#FilterTypes">FilterTypes</a>
  3250. </font>
  3251. </td>
  3252. <td><font size="-1">void</font></td>
  3253. <td>
  3254. <font size="-1">
  3255. <a href="https://imagemagick.org/Magick++/Enumerations.html#FilterTypes">FilterTypes</a>
  3256. filterType_
  3257. </font>
  3258. </td>
  3259. <td>
  3260. <font size="-1">
  3261. Filter to use when resizing image. The
  3262. reduction filter employed has a sigificant effect on the time required
  3263. to resize an image and the resulting quality. The default filter is <i>Lanczos</i>
  3264. which has been shown to produce high quality results when reducing most
  3265. images.
  3266. </font>
  3267. </td>
  3268. </tr>
  3269. <tr>
  3270. <td>
  3271. <center><a name="font"></a> <font size="-1">font</font></center>
  3272. </td>
  3273. <td><font size="-1">string</font></td>
  3274. <td><font size="-1">void</font></td>
  3275. <td><font size="-1">const string &amp;font_</font></td>
  3276. <td>
  3277. <font size="-1">
  3278. Text rendering font. If the font is a fully
  3279. qualified X server font name, the font is obtained from an X&#160;
  3280. server. To use a TrueType font, precede the TrueType filename with an
  3281. @. Otherwise, specify&#160; a&#160; Postscript font name (e.g.
  3282. "helvetica").
  3283. </font>
  3284. </td>
  3285. </tr>
  3286. <tr>
  3287. <td>
  3288. <center><a name="fontPointsize"></a> <font size="-1">fontPointsize</font></center>
  3289. </td>
  3290. <td><font size="-1">size_t</font></td>
  3291. <td><font size="-1">void</font></td>
  3292. <td><font size="-1">size_t pointSize_</font></td>
  3293. <td><font size="-1">Text rendering font point size</font></td>
  3294. </tr>
  3295. <tr>
  3296. <td>
  3297. <center><a name="fontTypeMetrics"></a> <font size="-1">fontTypeMetrics</font></center>
  3298. </td>
  3299. <td><font size="-1"><a href="TypeMetric.html">TypeMetric</a> </font></td>
  3300. <td>
  3301. <font size="-1">
  3302. const std::string &amp;text_, <a href="TypeMetric.html">TypeMetric</a> *metrics
  3303. </font>
  3304. </td>
  3305. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  3306. <td>
  3307. <font size="-1">
  3308. Update metrics with font type metrics using
  3309. specified <i>text</i>, and current <a href="Image++.html#font">font</a> and <a href="Image++.html#fontPointsize">fontPointSize</a> settings.
  3310. </font>
  3311. </td>
  3312. </tr>
  3313. <tr>
  3314. <td>
  3315. <center><a name="format"></a> <font size="-1">format</font></center>
  3316. </td>
  3317. <td><font size="-1">string</font></td>
  3318. <td><font size="-1">void</font></td>
  3319. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  3320. <td><font size="-1">Long form image format description.</font></td>
  3321. </tr>
  3322. <tr>
  3323. <td>
  3324. <center><a name="gamma"></a> <font size="-1">gamma</font></center>
  3325. </td>
  3326. <td><font size="-1">double (typical range 0.8 to 2.3)</font></td>
  3327. <td><font size="-1">void</font></td>
  3328. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  3329. <td>
  3330. <font size="-1">
  3331. Gamma level of the image. The same color
  3332. image displayed on two different&#160; workstations&#160; may&#160;
  3333. look&#160; different due to differences in the display monitor.&#160;
  3334. Use gamma correction&#160; to&#160; adjust&#160; for this&#160;
  3335. color&#160; difference.
  3336. </font>
  3337. </td>
  3338. </tr>
  3339. <tr>
  3340. <td>
  3341. <center><a name="geometry"></a> <font size="-1">geometry</font></center>
  3342. </td>
  3343. <td><font size="-1"><a href="Geometry.html">Geometry</a> </font></td>
  3344. <td><font size="-1">void</font></td>
  3345. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  3346. <td><font size="-1">Preferred size of the image when encoding.</font></td>
  3347. </tr>
  3348. <tr>
  3349. <td>
  3350. <center>
  3351. <a name="gifDisposeMethod"></a> <font size="-1">gifDispose-</font>
  3352. <br />
  3353. <font size="-1">Method</font>
  3354. </center>
  3355. </td>
  3356. <td>
  3357. <font size="-1">size_t</font> <br />
  3358. <font size="-1">{ 0 = Disposal not specified,</font> <br />
  3359. <font size="-1">1 = Do not dispose of graphic,</font> <br />
  3360. <font size="-1">3 = Overwrite graphic with background color,</font>
  3361. <br />
  3362. <font size="-1">4 = Overwrite graphic with previous graphic. }</font>
  3363. </td>
  3364. <td><font size="-1">void</font></td>
  3365. <td><font size="-1">size_t disposeMethod_</font></td>
  3366. <td>
  3367. <font size="-1">
  3368. GIF disposal method. This option is used to
  3369. control how successive frames are rendered (how the preceding frame is
  3370. disposed of) when creating a GIF animation.
  3371. </font>
  3372. </td>
  3373. </tr>
  3374. <tr>
  3375. <td>
  3376. <center><a name="iccColorProfile"></a> <font size="-1">iccColorProfile</font></center>
  3377. </td>
  3378. <td><font size="-1"><a href="Blob.html">Blob</a> </font></td>
  3379. <td><font size="-1">void</font></td>
  3380. <td>
  3381. <font size="-1">
  3382. const <a href="Blob.html">Blob</a>
  3383. &amp;colorProfile_
  3384. </font>
  3385. </td>
  3386. <td>
  3387. <font size="-1">
  3388. ICC color profile. Supplied via a <a href="Blob.html">Blob</a> since Magick++/ and ImageMagick do not
  3389. currently support formating this data structure directly.&#160;
  3390. Specifications are available from the <a href="http://www.color.org/">
  3391. International Color Consortium
  3392. </a> for the format of ICC color profiles.
  3393. </font>
  3394. </td>
  3395. </tr>
  3396. <tr>
  3397. <td>
  3398. <center>
  3399. <a name="interlaceType"></a> <font size="-1">interlace-</font>
  3400. <br />
  3401. <font size="-1">Type</font>
  3402. </center>
  3403. </td>
  3404. <td>
  3405. <font size="-1">
  3406. <a href="https://imagemagick.org/Magick++/Enumerations.html#InterlaceType">InterlaceType</a>
  3407. </font>
  3408. </td>
  3409. <td><font size="-1">void</font></td>
  3410. <td>
  3411. <font size="-1">
  3412. <a href="https://imagemagick.org/Magick++/Enumerations.html#InterlaceType">InterlaceType</a>
  3413. interlace_
  3414. </font>
  3415. </td>
  3416. <td>
  3417. <font size="-1">
  3418. The type of interlacing scheme (default <i>NoInterlace</i>
  3419. ). This option is used to specify the type of&#160; interlacing
  3420. scheme&#160; for&#160; raw&#160; image formats such as RGB or YUV. <i>NoInterlace</i>
  3421. means do not&#160; interlace, <i>LineInterlace</i> uses scanline
  3422. interlacing, and <i>PlaneInterlace</i> uses plane interlacing. <i>
  3423. PartitionInterlace
  3424. </i> is like <i>PlaneInterlace</i> except the&#160;
  3425. different planes&#160; are saved&#160; to individual files (e.g.&#160;
  3426. image.R, image.G, and image.B). Use <i>LineInterlace</i> or <i>
  3427. PlaneInterlace
  3428. </i> to create an interlaced GIF or progressive JPEG
  3429. image.
  3430. </font>
  3431. </td>
  3432. </tr>
  3433. <tr>
  3434. <td>
  3435. <center><a name="iptcProfile"></a> <font size="-1">iptcProfile</font></center>
  3436. </td>
  3437. <td><font size="-1"><a href="Blob.html">Blob</a> </font></td>
  3438. <td><font size="-1">void</font></td>
  3439. <td>
  3440. <font size="-1">
  3441. const <a href="Blob.html">Blob</a> &amp;
  3442. iptcProfile_
  3443. </font>
  3444. </td>
  3445. <td>
  3446. <font size="-1">
  3447. IPTC profile. Supplied via a <a href="Blob.html">Blob</a> since Magick++ and ImageMagick do not
  3448. currently&#160; support formating this data structure directly.
  3449. Specifications are available from the <a href="http://www.iptc.org/">
  3450. International Press Telecommunications Council
  3451. </a> for IPTC profiles.
  3452. </font>
  3453. </td>
  3454. </tr>
  3455. <tr>
  3456. <td>
  3457. <center><a name="label"></a> <font size="-1">label</font></center>
  3458. </td>
  3459. <td><font size="-1">string</font></td>
  3460. <td><font size="-1">void</font></td>
  3461. <td><font size="-1">const string &amp;label_</font></td>
  3462. <td><font size="-1">Image label</font></td>
  3463. </tr>
  3464. <tr>
  3465. <td>
  3466. <center><a name="magick"></a> <font size="-1">magick</font></center>
  3467. </td>
  3468. <td><font size="-1">string</font></td>
  3469. <td><font size="-1">void</font></td>
  3470. <td><font size="-1">&#160;const string &amp;magick_</font></td>
  3471. <td><font size="-1">Get image format (e.g. "GIF")</font></td>
  3472. </tr>
  3473. <tr>
  3474. <td>
  3475. <center><a name="alpha"></a> <font size="-1">alpha</font></center>
  3476. </td>
  3477. <td><font size="-1">const bool</font></td>
  3478. <td><font size="-1">void</font></td>
  3479. <td><font size="-1">const bool alphaFlag_</font></td>
  3480. <td>
  3481. <font size="-1">
  3482. Image supports transparency (alpha channel)
  3483. </font>
  3484. </td>
  3485. </tr>
  3486. <tr>
  3487. <td>
  3488. <center><a name="matteColor"></a> <font size="-1">matteColor</font></center>
  3489. </td>
  3490. <td><font size="-1"><a href="Color.html">Color</a> </font></td>
  3491. <td><font size="-1">void</font></td>
  3492. <td>
  3493. <font size="-1">
  3494. const <a href="Color.html">Color</a>
  3495. &amp;matteColor_
  3496. </font>
  3497. </td>
  3498. <td><font size="-1">Image matte (frame) color</font></td>
  3499. </tr>
  3500. <tr>
  3501. <td>
  3502. <center>
  3503. <a name="meanErrorPerPixel"></a> <font size="-1">meanError-</font>
  3504. <br />
  3505. <font size="-1">PerPixel</font>
  3506. </center>
  3507. </td>
  3508. <td><font size="-1">double</font></td>
  3509. <td><font size="-1">void</font></td>
  3510. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  3511. <td>
  3512. <font size="-1">
  3513. The mean error per pixel computed when an
  3514. image is color reduced. This parameter is only valid if verbose is set
  3515. to true and the image has just been quantized.
  3516. </font>
  3517. </td>
  3518. </tr>
  3519. <tr>
  3520. <td style="text-align: center; vertical-align: middle;">
  3521. <font size="-1">
  3522. <a name="modulusDepth"></a>modulusDepth<br />
  3523. </font>
  3524. </td>
  3525. <td style="text-align: left; vertical-align: middle;">
  3526. <small>
  3527. size_t
  3528. <br />
  3529. </small>
  3530. </td>
  3531. <td style="text-align: left; vertical-align: middle;">
  3532. <small>
  3533. <font size="-1">
  3534. <small>
  3535. void<br />
  3536. </small>
  3537. </font>
  3538. </small>
  3539. </td>
  3540. <td style="text-align: left; vertical-align: middle;">
  3541. <small>
  3542. size_t
  3543. depth_<br />
  3544. </small>
  3545. </td>
  3546. <td style="text-align: left; vertical-align: middle;">
  3547. <small>
  3548. Image
  3549. modulus depth (minimum number of bits required to support
  3550. red/green/blue components without loss of accuracy). The pixel modulus
  3551. depth may be decreased by supplying a value which is less than the
  3552. current value, updating the pixels (reducing accuracy) to the new
  3553. depth.
  3554. The pixel modulus depth can not be increased over the current value
  3555. using this method.<br />
  3556. </small>
  3557. </td>
  3558. </tr>
  3559. <tr>
  3560. <td>
  3561. <center><a name="monochrome"></a> <font size="-1">monochrome</font></center>
  3562. </td>
  3563. <td><font size="-1">bool</font></td>
  3564. <td><font size="-1">void</font></td>
  3565. <td><font size="-1">bool flag_</font></td>
  3566. <td><font size="-1">Transform the image to black and white</font></td>
  3567. </tr>
  3568. <tr>
  3569. <td>
  3570. <center>
  3571. <a name="montageGeometry"></a> <font size="-1">montage-</font>
  3572. <br />
  3573. <font size="-1">Geometry</font>
  3574. </center>
  3575. </td>
  3576. <td><font size="-1"><a href="Geometry.html">Geometry</a> </font></td>
  3577. <td><font size="-1">void</font></td>
  3578. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  3579. <td>
  3580. <font size="-1">
  3581. Tile size and offset within an image montage.
  3582. Only valid for montage images.
  3583. </font>
  3584. </td>
  3585. </tr>
  3586. <tr>
  3587. <td>
  3588. <center>
  3589. <a name="normalizedMaxError"></a> <font size="-1">normalized-</font>
  3590. <br />
  3591. <font size="-1">MaxError</font>
  3592. </center>
  3593. </td>
  3594. <td><font size="-1">double</font></td>
  3595. <td><font size="-1">void</font></td>
  3596. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  3597. <td>
  3598. <font size="-1">
  3599. The normalized max error per pixel computed
  3600. when an image is color reduced. This parameter is only valid if verbose
  3601. is set to true and the image has just been quantized.
  3602. </font>
  3603. </td>
  3604. </tr>
  3605. <tr>
  3606. <td>
  3607. <center>
  3608. <a name="normalizedMeanError"></a> <font size="-1">normalized-</font>
  3609. <br />
  3610. <font size="-1">MeanError</font>
  3611. </center>
  3612. </td>
  3613. <td><font size="-1">double</font></td>
  3614. <td><font size="-1">void</font></td>
  3615. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  3616. <td>
  3617. <font size="-1">
  3618. The normalized mean error per pixel computed
  3619. when an image is color reduced. This parameter is only valid if verbose
  3620. is set to true and the image has just been quantized.
  3621. </font>
  3622. </td>
  3623. </tr>
  3624. <tr>
  3625. <td style="text-align: center; vertical-align: middle;">
  3626. <small>
  3627. <a name="orientation"></a>orientation<br />
  3628. </small>
  3629. </td>
  3630. <td style="vertical-align: middle;">
  3631. <small>
  3632. <a href="https://imagemagick.org/Magick++/Enumerations.html#OrientationType">OrientationType</a>
  3633. </small>
  3634. </td>
  3635. <td style="vertical-align: top;">
  3636. <small>void</small><br />
  3637. </td>
  3638. <td style="vertical-align: middle;">
  3639. <small>
  3640. <a href="https://imagemagick.org/Magick++/Enumerations.html#OrientationType">OrientationType</a>
  3641. orientation_
  3642. </small>
  3643. </td>
  3644. <td style="vertical-align: top;">
  3645. <small>
  3646. Image orientation.
  3647. &#160;Supported by some file formats such as DPX and TIFF. Useful for
  3648. turning the right way up.<br />
  3649. </small>
  3650. </td>
  3651. </tr>
  3652. <tr>
  3653. <td>
  3654. <center><a name="packets"></a> <font size="-1">packets</font></center>
  3655. </td>
  3656. <td><font size="-1">size_t</font></td>
  3657. <td><font size="-1">void</font></td>
  3658. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  3659. <td>
  3660. <font size="-1">The number of runlength-encoded packets in</font>
  3661. <br />
  3662. <font size="-1">the image</font>
  3663. </td>
  3664. </tr>
  3665. <tr>
  3666. <td>
  3667. <center><a name="packetSize"></a> <font size="-1">packetSize</font></center>
  3668. </td>
  3669. <td><font size="-1">size_t</font></td>
  3670. <td><font size="-1">void</font></td>
  3671. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  3672. <td><font size="-1">The number of bytes in each pixel packet</font></td>
  3673. </tr>
  3674. <tr>
  3675. <td>
  3676. <center><a name="page"></a> <font size="-1">page</font></center>
  3677. </td>
  3678. <td>
  3679. <font size="-1">
  3680. <a href="Geometry.html#PostscriptPageSize">Geometry</a>
  3681. </font>
  3682. </td>
  3683. <td><font size="-1">void</font></td>
  3684. <td>
  3685. <font size="-1">
  3686. const <a href="Geometry.html#PostscriptPageSize">Geometry</a> &amp;pageSize_
  3687. </font>
  3688. </td>
  3689. <td>
  3690. <font size="-1">
  3691. Preferred size and location of an image
  3692. canvas.
  3693. </font>
  3694. <p>
  3695. <font size="-1">
  3696. Use this option to specify the dimensions
  3697. and position of the Postscript page in dots per inch or a TEXT page in
  3698. pixels. This option is typically used in concert with <i>
  3699. <a href="Image++.html#density">density</a>
  3700. </i>.
  3701. </font>
  3702. </p>
  3703. <p>
  3704. <font size="-1">
  3705. Page may also be used to position a GIF
  3706. image (such as for a scene in an animation)
  3707. </font>
  3708. </p>
  3709. </td>
  3710. </tr>
  3711. <tr>
  3712. <td>
  3713. <center><a name="pixelColor"></a> <font size="-1">pixelColor</font></center>
  3714. </td>
  3715. <td><font size="-1"><a href="Color.html">Color</a> </font></td>
  3716. <td><font size="-1">ssize_t x_, ssize_t y_</font></td>
  3717. <td>
  3718. <font size="-1">
  3719. ssize_t x_, ssize_t y_, const <a href="Color.html">Color</a> &amp;color_
  3720. </font>
  3721. </td>
  3722. <td><font size="-1">Get/set pixel color at location x &amp; y.</font></td>
  3723. </tr>
  3724. <tr>
  3725. <td valign="top">
  3726. <div style="text-align:center">
  3727. <a name="profile"></a> <small>profile</small><br />
  3728. </div>
  3729. </td>
  3730. <td valign="top">
  3731. <a href="Blob.html">
  3732. <small> Blob</small><small>
  3733. <br />
  3734. </small>
  3735. </a>
  3736. </td>
  3737. <td valign="top">
  3738. <small>const std::string name_</small><small>
  3739. <br />
  3740. </small>
  3741. </td>
  3742. <td valign="top">
  3743. <small>
  3744. const std::string name_, const Blob
  3745. &amp;colorProfile_
  3746. </small><small>
  3747. <br />
  3748. </small>
  3749. </td>
  3750. <td valign="top">
  3751. <small>Get/set/remove </small><small>
  3752. a named
  3753. profile
  3754. </small><small>. Valid names include </small><small>
  3755. "*",
  3756. "8BIM", "ICM", "IPTC", or a user/format-defined profile name.
  3757. </small><br />
  3758. </td>
  3759. </tr>
  3760. <tr>
  3761. <td>
  3762. <center><a name="quality"></a> <font size="-1">quality</font></center>
  3763. </td>
  3764. <td><font size="-1">size_t (0 to 100)</font></td>
  3765. <td><font size="-1">void</font></td>
  3766. <td><font size="-1">size_t quality_</font></td>
  3767. <td><font size="-1">JPEG/MIFF/PNG compression level (default 75).</font></td>
  3768. </tr>
  3769. <tr>
  3770. <td>
  3771. <center>
  3772. <a name="quantizeColors"></a> <font size="-1">quantize-</font>
  3773. <br />
  3774. <font size="-1">Colors</font>
  3775. </center>
  3776. </td>
  3777. <td><font size="-1">size_t</font></td>
  3778. <td><font size="-1">void</font></td>
  3779. <td><font size="-1">size_t colors_</font></td>
  3780. <td>
  3781. <font size="-1">
  3782. Preferred number of colors in the image. The
  3783. actual number of colors in the image may be less than your request, but
  3784. never more. Images with less unique colors than specified with this
  3785. option will have any duplicate or unused colors removed.
  3786. </font>
  3787. </td>
  3788. </tr>
  3789. <tr>
  3790. <td>
  3791. <center>
  3792. <a name="quantizeColorSpace"></a> <font size="-1">quantize-</font>
  3793. <br />
  3794. <font size="-1">ColorSpace</font>
  3795. </center>
  3796. </td>
  3797. <td>
  3798. <font size="-1">
  3799. <a href="https://imagemagick.org/Magick++/Enumerations.html#ColorspaceType">ColorspaceType</a>
  3800. </font>
  3801. </td>
  3802. <td><font size="-1">void</font></td>
  3803. <td>
  3804. <font size="-1">
  3805. <a href="https://imagemagick.org/Magick++/Enumerations.html#ColorspaceType">ColorspaceType</a>
  3806. colorSpace_
  3807. </font>
  3808. </td>
  3809. <td>
  3810. <font size="-1">
  3811. Colorspace to quantize colors in (default
  3812. RGB). Empirical evidence suggests that distances in color spaces such
  3813. as YUV or YIQ correspond to perceptual color differences more closely
  3814. than do distances in RGB space. These color spaces may give better
  3815. results when color reducing an image.
  3816. </font>
  3817. </td>
  3818. </tr>
  3819. <tr>
  3820. <td>
  3821. <center>
  3822. <a name="quantizeDither"></a> <font size="-1">quantize-</font>
  3823. <br />
  3824. <font size="-1">Dither</font>
  3825. </center>
  3826. </td>
  3827. <td><font size="-1">bool</font></td>
  3828. <td><font size="-1">void</font></td>
  3829. <td><font size="-1">bool flag_</font></td>
  3830. <td>
  3831. <font size="-1">
  3832. Apply Floyd/Steinberg error diffusion to the
  3833. image. The basic strategy of dithering is to&#160; trade&#160;
  3834. intensity
  3835. resolution&#160; for&#160; spatial&#160; resolution&#160; by&#160;
  3836. averaging the intensities&#160; of&#160; several&#160;
  3837. neighboring&#160; pixels. Images which&#160; suffer&#160; from&#160;
  3838. severe&#160; contouring&#160; when&#160; reducing colors can be
  3839. improved with this option. The quantizeColors or monochrome option must
  3840. be set for this option to take effect.
  3841. </font>
  3842. </td>
  3843. </tr>
  3844. <tr>
  3845. <td>
  3846. <center>
  3847. <a name="quantizeTreeDepth"></a> <font size="-1">quantize-</font>
  3848. <br />
  3849. <font size="-1">TreeDepth</font>
  3850. </center>
  3851. </td>
  3852. <td><font size="-1">size_t&#160;</font></td>
  3853. <td><font size="-1">void</font></td>
  3854. <td><font size="-1">size_t treeDepth_</font></td>
  3855. <td>
  3856. <font size="-1">
  3857. Depth of the quantization color
  3858. classification tree. Values of 0 or 1 allow selection of the optimal
  3859. tree depth for the color reduction algorithm. Values between 2 and 8
  3860. may be used to manually adjust the tree depth.
  3861. </font>
  3862. </td>
  3863. </tr>
  3864. <tr>
  3865. <td>
  3866. <center>
  3867. <a name="renderingIntent"></a> <font size="-1">rendering-</font>
  3868. <br />
  3869. <font size="-1">Intent</font>
  3870. </center>
  3871. </td>
  3872. <td>
  3873. <font size="-1">
  3874. <a href="https://imagemagick.org/Magick++/Enumerations.html#RenderingIntent">RenderingIntent</a>
  3875. </font>
  3876. </td>
  3877. <td><font size="-1">void</font></td>
  3878. <td>
  3879. <font size="-1">
  3880. <a href="https://imagemagick.org/Magick++/Enumerations.html#RenderingIntent">RenderingIntent</a>
  3881. render_
  3882. </font>
  3883. </td>
  3884. <td><font size="-1">The type of rendering intent</font></td>
  3885. </tr>
  3886. <tr>
  3887. <td>
  3888. <center>
  3889. <a name="resolutionUnits"></a> <font size="-1">resolution-</font>
  3890. <br />
  3891. <font size="-1">Units</font>
  3892. </center>
  3893. </td>
  3894. <td>
  3895. <font size="-1">
  3896. <a href="https://imagemagick.org/Magick++/Enumerations.html#ResolutionType">ResolutionType</a>
  3897. </font>
  3898. </td>
  3899. <td><font size="-1">void</font></td>
  3900. <td>
  3901. <font size="-1">
  3902. <a href="https://imagemagick.org/Magick++/Enumerations.html#ResolutionType">ResolutionType</a>
  3903. units_
  3904. </font>
  3905. </td>
  3906. <td><font size="-1">Units of image resolution</font></td>
  3907. </tr>
  3908. <tr>
  3909. <td>
  3910. <center><a name="rows"></a> <font size="-1">rows</font></center>
  3911. </td>
  3912. <td><font size="-1">size_t</font></td>
  3913. <td><font size="-1">void</font></td>
  3914. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  3915. <td><font size="-1">The number of pixel rows in the image</font></td>
  3916. </tr>
  3917. <tr>
  3918. <td>
  3919. <center><a name="scene"></a> <font size="-1">scene</font></center>
  3920. </td>
  3921. <td><font size="-1">size_t</font></td>
  3922. <td><font size="-1">void</font></td>
  3923. <td><font size="-1">size_t scene_</font></td>
  3924. <td><font size="-1">Image scene number</font></td>
  3925. </tr>
  3926. <tr>
  3927. <td>
  3928. <center><a name="signature"></a> <font size="-1">signature</font></center>
  3929. </td>
  3930. <td><font size="-1">string</font></td>
  3931. <td><font size="-1">bool force_ = false</font></td>
  3932. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  3933. <td>
  3934. <font size="-1">
  3935. Image MD5 signature. Set force_ to 'true' to
  3936. force re-computation of signature.
  3937. </font>
  3938. </td>
  3939. </tr>
  3940. <tr>
  3941. <td>
  3942. <center><a name="size"></a> <font size="-1">size</font></center>
  3943. </td>
  3944. <td><font size="-1"><a href="Geometry.html">Geometry</a> </font></td>
  3945. <td><font size="-1">void</font></td>
  3946. <td>
  3947. <font size="-1">
  3948. const <a href="Geometry.html">Geometry</a>
  3949. &amp;geometry_
  3950. </font>
  3951. </td>
  3952. <td>
  3953. <font size="-1">
  3954. Width and height of a raw image (an image
  3955. which does not support width and height information).&#160; Size may
  3956. also be used to affect the image size read from a multi-resolution
  3957. format (e.g. Photo CD, JBIG, or JPEG.
  3958. </font>
  3959. </td>
  3960. </tr>
  3961. <tr>
  3962. <td style="text-align: center;">
  3963. <center><a name="strip"></a> <font size="-1">strip</font></center>
  3964. </td>
  3965. <td><font size="-1">void</font></td>
  3966. <td><font size="-1">strips an image of all profiles and comments.</font></td>
  3967. </tr>
  3968. <tr>
  3969. <td>
  3970. <center><a name="strokeAntiAlias"></a> <font size="-1">strokeAntiAlias</font></center>
  3971. </td>
  3972. <td><font size="-1">bool</font></td>
  3973. <td><font size="-1">void</font></td>
  3974. <td><font size="-1">bool flag_</font></td>
  3975. <td>
  3976. <font size="-1">
  3977. Enable or disable anti-aliasing when drawing
  3978. object outlines.
  3979. </font>
  3980. </td>
  3981. </tr>
  3982. <tr>
  3983. <td>
  3984. <center><a name="strokeColor"></a> <font size="-1">strokeColor</font></center>
  3985. </td>
  3986. <td><font size="-1">Color</font></td>
  3987. <td><font size="-1">void</font></td>
  3988. <td><font size="-1">const Color &amp;strokeColor_</font></td>
  3989. <td><font size="-1">Color to use when drawing object outlines</font></td>
  3990. </tr>
  3991. <tr>
  3992. <td>
  3993. <center><a name="strokeDashOffset"></a> <font size="-1">strokeDashOffset</font></center>
  3994. </td>
  3995. <td><font size="-1">size_t</font></td>
  3996. <td><font size="-1">void</font></td>
  3997. <td><font size="-1">double strokeDashOffset_</font></td>
  3998. <td>
  3999. <font size="-1">
  4000. While drawing using a dash pattern, specify
  4001. distance into the dash pattern to start the dash (default 0).
  4002. </font>
  4003. </td>
  4004. </tr>
  4005. <tr>
  4006. <td>
  4007. <center><a name="strokeDashArray"></a> <font size="-1">strokeDashArray</font></center>
  4008. </td>
  4009. <td><font size="-1">const double*</font></td>
  4010. <td><font size="-1">void</font></td>
  4011. <td><font size="-1">const double* strokeDashArray_</font></td>
  4012. <td>
  4013. <font size="-1">
  4014. Specify the pattern of dashes and gaps used
  4015. to stroke paths. The strokeDashArray represents a zero-terminated
  4016. array of numbers that specify the lengths (in pixels) of alternating
  4017. dashes and gaps in user units. If an odd number of values is provided,
  4018. then the list of values is repeated to yield an even number of
  4019. values.&#160; A typical strokeDashArray_ array might contain the
  4020. members 5 3 2 0, where the zero value indicates the end of the pattern
  4021. array.
  4022. </font>
  4023. </td>
  4024. </tr>
  4025. <tr>
  4026. <td>
  4027. <center><a name="strokeLineCap"></a> <font size="-1">strokeLineCap</font></center>
  4028. </td>
  4029. <td><font size="-1">LineCap</font></td>
  4030. <td><font size="-1">void</font></td>
  4031. <td><font size="-1">LineCap lineCap_</font></td>
  4032. <td>
  4033. <font size="-1">
  4034. Specify the shape to be used at the corners
  4035. of paths (or other vector shapes) when they are stroked. Values of
  4036. LineJoin are UndefinedJoin, MiterJoin, RoundJoin, and BevelJoin.
  4037. </font>
  4038. </td>
  4039. </tr>
  4040. <tr>
  4041. <td>
  4042. <center><a name="strokeLineJoin"></a> <font size="-1">strokeLineJoin</font></center>
  4043. </td>
  4044. <td><font size="-1">LineJoin</font></td>
  4045. <td><font size="-1">void</font></td>
  4046. <td><font size="-1">LineJoin lineJoin_</font></td>
  4047. <td>
  4048. <font size="-1">
  4049. Specify the shape to be used at the corners
  4050. of paths (or other vector shapes) when they are stroked. Values of
  4051. LineJoin are UndefinedJoin, MiterJoin, RoundJoin, and BevelJoin.
  4052. </font>
  4053. </td>
  4054. </tr>
  4055. <tr>
  4056. <td>
  4057. <center><a name="strokeMiterLimit"></a> <font size="-1">strokeMiterLimit</font></center>
  4058. </td>
  4059. <td><font size="-1">size_t</font></td>
  4060. <td><font size="-1">void</font></td>
  4061. <td><font size="-1">size_t miterLimit_</font></td>
  4062. <td>
  4063. <font size="-1">
  4064. Specify miter limit. When two line segments
  4065. meet at a sharp angle and miter joins have been specified for
  4066. 'lineJoin', it is possible for the miter to extend far beyond the
  4067. thickness of the line stroking the path. The miterLimit' imposes a
  4068. limit on the ratio of the miter length to the 'lineWidth'. The default
  4069. value of this parameter is 4.
  4070. </font>
  4071. </td>
  4072. </tr>
  4073. <tr>
  4074. <td>
  4075. <center><a name="strokeWidth"></a> <font size="-1">strokeWidth</font></center>
  4076. </td>
  4077. <td><font size="-1">double</font></td>
  4078. <td><font size="-1">void</font></td>
  4079. <td><font size="-1">double strokeWidth_</font></td>
  4080. <td>
  4081. <font size="-1">
  4082. Stroke width for use when drawing vector
  4083. objects (default one)
  4084. </font>
  4085. </td>
  4086. </tr>
  4087. <tr>
  4088. <td>
  4089. <center><a name="strokePattern"></a> <font size="-1">strokePattern</font></center>
  4090. </td>
  4091. <td><font size="-1">Image</font></td>
  4092. <td><font size="-1">void</font></td>
  4093. <td><font size="-1">const Image &amp;strokePattern_</font></td>
  4094. <td>
  4095. <font size="-1">
  4096. Pattern image to use while drawing object
  4097. stroke (outlines).
  4098. </font>
  4099. </td>
  4100. </tr>
  4101. <tr>
  4102. <td>
  4103. <center><a name="subImage"></a> <font size="-1">subImage</font></center>
  4104. </td>
  4105. <td><font size="-1">size_t</font></td>
  4106. <td><font size="-1">void</font></td>
  4107. <td><font size="-1">size_t subImage_</font></td>
  4108. <td><font size="-1">Subimage of an image sequence</font></td>
  4109. </tr>
  4110. <tr>
  4111. <td>
  4112. <center><a name="subRange"></a> <font size="-1">subRange</font></center>
  4113. </td>
  4114. <td><font size="-1">size_t</font></td>
  4115. <td><font size="-1">void</font></td>
  4116. <td><font size="-1">size_t subRange_</font></td>
  4117. <td><font size="-1">Number of images relative to the base image</font></td>
  4118. </tr>
  4119. <tr>
  4120. <td valign="middle">
  4121. <div style="text-align:center">
  4122. <a name="textEncoding"></a> <small>textEncoding</small><br />
  4123. </div>
  4124. </td>
  4125. <td valign="middle">
  4126. <small>string</small><small>
  4127. <br />
  4128. </small>
  4129. </td>
  4130. <td valign="middle">
  4131. <small>void</small><small>
  4132. <br />
  4133. </small>
  4134. </td>
  4135. <td valign="middle">
  4136. <small>const std::string &amp;encoding_</small><small>
  4137. <br />
  4138. </small>
  4139. </td>
  4140. <td valign="top">
  4141. <small>
  4142. Specify the code set to use for text
  4143. annotations. The only character encoding which may be specified at
  4144. this time is "UTF-8" for representing
  4145. </small><small>
  4146. <a href="http://www.unicode.org/">Unicode</a>
  4147. </small><small>
  4148. as a
  4149. sequence of bytes. Specify an empty string to use the default ASCII
  4150. encoding. Successful text annotation using Unicode may require fonts
  4151. designed to support Unicode.
  4152. </small><br />
  4153. </td>
  4154. </tr>
  4155. <tr>
  4156. <td>
  4157. <center><a name="tileName"></a> <font size="-1">tileName</font></center>
  4158. </td>
  4159. <td><font size="-1">string</font></td>
  4160. <td><font size="-1">void</font></td>
  4161. <td><font size="-1">const string &amp;tileName_</font></td>
  4162. <td><font size="-1">Tile name</font></td>
  4163. </tr>
  4164. <tr>
  4165. <td>
  4166. <center><a name="totalColors"></a> <font size="-1">totalColors</font></center>
  4167. </td>
  4168. <td><font size="-1">size_t</font></td>
  4169. <td><font size="-1">void</font></td>
  4170. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  4171. <td><font size="-1">Number of colors in the image</font></td>
  4172. </tr>
  4173. <tr>
  4174. <td>
  4175. <center><a name="type"></a> <font size="-1">type</font></center>
  4176. </td>
  4177. <td>
  4178. <font size="-1">
  4179. <a href="https://imagemagick.org/Magick++/Enumerations.html#ImageType">ImageType</a>
  4180. </font>
  4181. </td>
  4182. <td><font size="-1">void</font></td>
  4183. <td bgcolor="#ffffff">
  4184. <font size="-1">
  4185. <a href="https://imagemagick.org/Magick++/Enumerations.html#ImageType">ImageType</a>
  4186. </font>
  4187. </td>
  4188. <td><font size="-1">Image type.</font></td>
  4189. </tr>
  4190. <tr>
  4191. <td>
  4192. <center><a name="verbose"></a> <font size="-1">verbose</font></center>
  4193. </td>
  4194. <td><font size="-1">bool</font></td>
  4195. <td><font size="-1">void</font></td>
  4196. <td><font size="-1">bool verboseFlag_</font></td>
  4197. <td><font size="-1">Print detailed information about the image</font></td>
  4198. </tr>
  4199. <tr>
  4200. <td>
  4201. <center><a name="view"></a> <font size="-1">view</font></center>
  4202. </td>
  4203. <td><font size="-1">string</font></td>
  4204. <td><font size="-1">void</font></td>
  4205. <td><font size="-1">const string &amp;view_</font></td>
  4206. <td><font size="-1">FlashPix viewing parameters.</font></td>
  4207. </tr>
  4208. <tr>
  4209. <td>
  4210. <center><a name="virtualPixelMethod"></a> <font size="-1">virtualPixelMethod</font></center>
  4211. </td>
  4212. <td>
  4213. <font size="-1">
  4214. <a href="https://imagemagick.org/Magick++/Enumerations.html#VirtualPixelMethod">VirtualPixelMethod</a>
  4215. </font>
  4216. </td>
  4217. <td><small><font size="-1"><small>void</small></font></small></td>
  4218. <td>
  4219. <small>
  4220. <font size="-1">
  4221. <small>
  4222. <a href="https://imagemagick.org/Magick++/Enumerations.html#VirtualPixelMethod">VirtualPixelMethod</a>
  4223. virtualPixelMethod_
  4224. </small>
  4225. </font>
  4226. </small>
  4227. </td>
  4228. <td><font size="-1">Image virtual pixel method.</font></td>
  4229. </tr>
  4230. <tr>
  4231. <td>
  4232. <center><a name="x11Display"></a> <font size="-1">x11Display</font></center>
  4233. </td>
  4234. <td><font size="-1">string (e.g. "hostname:0.0")</font></td>
  4235. <td><font size="-1">void</font></td>
  4236. <td><font size="-1">const string &amp;display_</font></td>
  4237. <td>
  4238. <font size="-1">
  4239. X11 display to display to, obtain fonts from,
  4240. or to capture image from
  4241. </font>
  4242. </td>
  4243. </tr>
  4244. <tr>
  4245. <td>
  4246. <center><a name="xResolution"></a> <font size="-1">xResolution</font></center>
  4247. </td>
  4248. <td><font size="-1">double</font></td>
  4249. <td><font size="-1">void</font></td>
  4250. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  4251. <td><font size="-1">x resolution of the image</font></td>
  4252. </tr>
  4253. <tr>
  4254. <td>
  4255. <center><a name="yResolution"></a> <font size="-1">yResolution</font></center>
  4256. </td>
  4257. <td><font size="-1">double</font></td>
  4258. <td><font size="-1">void</font></td>
  4259. <td bgcolor="#666666"><font size="-1">&#160;</font></td>
  4260. <td><font size="-1">y resolution of the image</font></td>
  4261. </tr>
  4262. </tbody>
  4263. </table>
  4264. <center>
  4265. <h3> <a name="Raw Image Pixel Access"></a> Low-Level Image Pixel Access</h3>
  4266. </center>
  4267. Image pixels (of type <i><a href="https://imagemagick.org/Magick++/Quantum.html">Quantum</a> </i>)
  4268. may be accessed directly via the <i>Image Pixel Cache</i> .&#160; The
  4269. image pixel cache is a rectangular window into the actual image pixels
  4270. (which may be in memory, memory-mapped from a disk file, or entirely on
  4271. disk). Two interfaces exist to access the <i>Image Pixel Cache.</i>
  4272. The
  4273. interface described here (part of the <i>Image</i> class) supports
  4274. only
  4275. one view at a time. See the <i><a href="Pixels.html">Pixels</a> </i>
  4276. class for a more abstract interface which supports simultaneous pixel
  4277. views (up to the number of rows). As an analogy, the interface
  4278. described
  4279. here relates to the <i><a href="Pixels.html">Pixels</a> </i> class as
  4280. stdio's gets() relates to fgets(). The <i>
  4281. <a href="Pixels.html"> Pixels</a>
  4282. </i>class provides the more general form of the interface.
  4283. <p>
  4284. Obtain existing image pixels via <i>getPixels()</i>. Create a new
  4285. pixel region using <i>setPixels().</i>
  4286. </p>
  4287. <p>
  4288. In order to ensure that only the current generation of the image is
  4289. modified, the Image's <a href="Image++.html#modifyImage">modifyImage()</a> method
  4290. should be invoked to reduce the reference count on the underlying image
  4291. to one. If this is not done, then it is possible for a previous
  4292. generation of the image to be modified due to the use of reference
  4293. counting when copying or constructing an Image.<br />
  4294. </p>
  4295. <p>
  4296. Depending on the capabilities of the operating system, and the
  4297. relationship of the window to the image, the pixel cache may be a copy
  4298. of the pixels in the selected window, or it may be the actual image
  4299. pixels. In any case calling <i>syncPixels()</i> insures that the base
  4300. image is updated with the contents of the modified pixel cache. The
  4301. method <i> readPixels()</i> supports copying foreign pixel data
  4302. formats
  4303. into the pixel cache according to the <i>QuantumTypes</i>. The method <i>writePixels()</i>
  4304. supports copying the pixels in the cache to a foreign pixel
  4305. representation according to the format specified by <i>QuantumTypes</i>.
  4306. </p>
  4307. <p>
  4308. The pixel region is effectively a small image in which the pixels
  4309. may be accessed, addressed, and updated, as shown in the following
  4310. example:
  4311. </p>
  4312. <pre class="code">
  4313. <img class="icon" src="Cache.png" name="Graphic1" width="254" border="0" alt="cache" />
  4314. Image image("cow.png");
  4315. // Ensure that there are no other references to this image.
  4316. image.modifyImage();
  4317. // Set the image type to TrueColor DirectClass representation.
  4318. image.type(TrueColorType);
  4319. // Request pixel region with size 60x40, and top origin at 20x30
  4320. ssize_t columns = 60;
  4321. Quantum *pixel_cache = image.getPixels(20,30,columns,40);
  4322. // Set pixel at column 5, and row 10 in the pixel cache to red.
  4323. ssize_t column = 5;
  4324. ssize_t row = 10;
  4325. Quantum *pixel = pixel_cache+row*columns+column;
  4326. *pixel = Color("red");
  4327. // Save changes to underlying image .
  4328. image.syncPixels();
  4329. // Save updated image to file.
  4330. image.write("horse.png");
  4331. </pre>
  4332. <p>
  4333. The image cache supports the following methods: <br />
  4334. &#160;
  4335. </p>
  4336. <table border="1" width="100%">
  4337. <caption>Image Cache Methods</caption>
  4338. <tbody>
  4339. <tr>
  4340. <td>
  4341. <center><b>Method</b></center>
  4342. </td>
  4343. <td>
  4344. <center><b>Returns</b></center>
  4345. </td>
  4346. <td>
  4347. <center><b>Signature</b></center>
  4348. </td>
  4349. <td>
  4350. <center><b>Description</b></center>
  4351. </td>
  4352. </tr>
  4353. <tr>
  4354. <td>
  4355. <center><a name="getConstPixels"></a> <font size="-1">getConstPixels</font></center>
  4356. </td>
  4357. <td>
  4358. <font size="-1">
  4359. const <a href="https://imagemagick.org/Magick++/Quantum.html">Quantum</a>
  4360. *
  4361. </font>
  4362. </td>
  4363. <td>
  4364. <font size="-1">
  4365. const ssize_t x_, const ssize_t y_, const size_t
  4366. columns_, const size_t rows_
  4367. </font>
  4368. </td>
  4369. <td>
  4370. <font size="-1">
  4371. Transfers pixels from the image to the pixel
  4372. cache as defined by the specified rectangular region.&#160;
  4373. </font><font size="-1">
  4374. The returned pointer remains valid until the next getPixel,
  4375. getConstPixels, or setPixels call and should never be deallocated by
  4376. the
  4377. user.
  4378. </font>
  4379. </td>
  4380. </tr>
  4381. <tr>
  4382. <td>
  4383. <center><a name="getConstMetacontent"></a> <font size="-1">getConstMetacontent</font></center>
  4384. </td>
  4385. <td><font size="-1">const void*</font></td>
  4386. <td><font size="-1">void</font></td>
  4387. <td>
  4388. <font size="-1">
  4389. Returns a pointer to the Image pixel indexes
  4390. corresponding to a previous
  4391. </font><font size="-1">
  4392. getPixel,
  4393. getConstPixels, or setPixels call. &#160;
  4394. </font><font size="-1">
  4395. The
  4396. returned pointer remains valid until the next getPixel, getConstPixels,
  4397. or setPixels call and should never be deallocated by the user.
  4398. </font><font size="-1">
  4399. Only valid for PseudoClass images or CMYKA images. The
  4400. pixel indexes represent an array of type void, with each entry
  4401. corresponding to an x,y pixel position. For PseudoClass images, the
  4402. entry's value is the offset into the colormap (see <a href="Image++.html#colorMap">colorMap</a>
  4403. ) for that pixel. For CMYKA images, the indexes are used to contain the
  4404. alpha channel.
  4405. </font>
  4406. </td>
  4407. </tr>
  4408. <tr>
  4409. <td>
  4410. <center><a name="getMetacontent"></a> <font size="-1">getMetacontent</font></center>
  4411. </td>
  4412. <td><font size="-1">void*</font></td>
  4413. <td><font size="-1">void</font></td>
  4414. <td>
  4415. <font size="-1">
  4416. Returns a pointer to the Image pixel meta content
  4417. corresponding to the pixel region requested by the last <a href="Image++.html#getConstPixels">getConstPixels</a> , <a href="Image++.html#getPixels">getPixels</a>
  4418. , or <a href="Image++.html#setPixels">setPixels</a> call.
  4419. </font><font size="-1">
  4420. The
  4421. returned pointer remains valid until the next getPixel, getConstPixels,
  4422. or setPixels call and should never be deallocated by the user.
  4423. </font>
  4424. </td>
  4425. </tr>
  4426. <tr>
  4427. <td>
  4428. <center><a name="getPixels"></a> <font size="-1">getPixels</font></center>
  4429. </td>
  4430. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Quantum.html">Quantum</a> *</font></td>
  4431. <td>
  4432. <font size="-1">
  4433. const ssize_t x_, const ssize_t y_, const size_t
  4434. columns_, const size_t rows_
  4435. </font>
  4436. </td>
  4437. <td>
  4438. <font size="-1">
  4439. Transfers pixels from the image to the pixel
  4440. cache as defined by the specified rectangular region. Modified pixels
  4441. may be subsequently transferred back to the image via syncPixels.
  4442. </font><font size="-1">
  4443. The returned pointer remains valid until the next getPixel,
  4444. getConstPixels, or setPixels call and should never be deallocated by
  4445. the
  4446. user.
  4447. </font><font size="-1"></font>
  4448. </td>
  4449. </tr>
  4450. <tr>
  4451. <td>
  4452. <center><a name="setPixels"></a> <font size="-1">setPixels</font></center>
  4453. </td>
  4454. <td><font size="-1"><a href="https://imagemagick.org/Magick++/Quantum.html">Quantum</a> *</font></td>
  4455. <td>
  4456. <font size="-1">
  4457. const ssize_t x_, const ssize_t y_, const size_t
  4458. columns_, const size_t rows_
  4459. </font>
  4460. </td>
  4461. <td>
  4462. <font size="-1">
  4463. Allocates a pixel cache region to store image
  4464. pixels as defined by the region rectangle.&#160; This area is
  4465. subsequently transferred from the pixel cache to the image via
  4466. syncPixels.&#160;
  4467. </font><font size="-1">
  4468. The returned pointer remains
  4469. valid until the next getPixel, getConstPixels, or setPixels call and
  4470. should never be deallocated by the user.
  4471. </font>
  4472. </td>
  4473. </tr>
  4474. <tr>
  4475. <td>
  4476. <center><a name="syncPixels"></a> <font size="-1">syncPixels</font></center>
  4477. </td>
  4478. <td><font size="-1">void</font></td>
  4479. <td><font size="-1">void</font></td>
  4480. <td><font size="-1">Transfers the image cache pixels to the image.</font></td>
  4481. </tr>
  4482. <tr>
  4483. <td>
  4484. <center><a name="readPixels"></a> <font size="-1">readPixels</font></center>
  4485. </td>
  4486. <td><font size="-1">void</font></td>
  4487. <td>
  4488. <font size="-1">
  4489. <a href="https://imagemagick.org/Magick++/Enumerations.html#QuantumTypes">QuantumTypes</a>
  4490. quantum_, unsigned char *source_,
  4491. </font>
  4492. </td>
  4493. <td>
  4494. <font size="-1">
  4495. Transfers one or more pixel components from a
  4496. buffer or file into the image pixel cache of an image. ReadPixels is
  4497. typically used to support image decoders. The region transferred
  4498. corresponds to the region set by a preceding setPixels call.
  4499. </font>
  4500. </td>
  4501. </tr>
  4502. <tr>
  4503. <td>
  4504. <center><a name="writePixels"></a> <font size="-1">writePixels</font></center>
  4505. </td>
  4506. <td><font size="-1">void</font></td>
  4507. <td>
  4508. <font size="-1">
  4509. <a href="https://imagemagick.org/Magick++/Enumerations.html#QuantumTypes">QuantumTypes</a>
  4510. quantum_, unsigned char *destination_
  4511. </font>
  4512. </td>
  4513. <td>
  4514. <font size="-1">
  4515. Transfers one or more pixel components from
  4516. the image pixel cache to a buffer or file. WritePixels is typically
  4517. used to support image encoders. The region transferred corresponds to
  4518. the region set by a preceding getPixels or getConstPixels call.
  4519. </font>
  4520. </td>
  4521. </tr>
  4522. </tbody>
  4523. </table>
  4524. </div>
  4525. </body>
  4526. </html>