PageRenderTime 47ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/plugins/ImageMagick-6.3.2/wand/magick-property.c

https://bitbucket.org/sisko/operation-caribou
C | 1612 lines | 521 code | 19 blank | 1072 comment | 166 complexity | ad0684252ece2db02e5b1b1bb9bfe041 MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception, LGPL-2.1

Large files files are truncated, but you can click here to view the full file

  1. /*
  2. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  3. % %
  4. % %
  5. % %
  6. % M M AAA GGGG IIIII CCCC K K %
  7. % MM MM A A G I C K K %
  8. % M M M AAAAA G GGG I C KKK %
  9. % M M A A G G I C K K %
  10. % M M A A GGGG IIIII CCCC K K %
  11. % %
  12. % PPPP RRRR OOO PPPP EEEEE RRRR TTTTT Y Y %
  13. % P P R R O O P P E R R T Y Y %
  14. % PPPP RRRR O O PPPP EEE RRRR T Y %
  15. % P R R O O P E R R T Y %
  16. % P R R OOO P EEEEE R R T Y %
  17. % %
  18. % %
  19. % Set or Get MagickWand Properties %
  20. % %
  21. % Software Design %
  22. % John Cristy %
  23. % August 2003 %
  24. % %
  25. % %
  26. % Copyright 1999-2006 ImageMagick Studio LLC, a non-profit organization %
  27. % dedicated to making software imaging solutions freely available. %
  28. % %
  29. % You may not use this file except in compliance with the License. You may %
  30. % obtain a copy of the License at %
  31. % %
  32. % http://www.imagemagick.org/script/license.php %
  33. % %
  34. % Unless required by applicable law or agreed to in writing, software %
  35. % distributed under the License is distributed on an "AS IS" BASIS, %
  36. % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. %
  37. % See the License for the specific language governing permissions and %
  38. % limitations under the License. %
  39. % %
  40. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  41. %
  42. %
  43. %
  44. */
  45. /*
  46. Include declarations.
  47. */
  48. #include "wand/studio.h"
  49. #include "wand/MagickWand.h"
  50. #include "wand/magick-wand-private.h"
  51. #include "wand/wand.h"
  52. /*
  53. Define declarations.
  54. */
  55. #define ThrowWandException(severity,tag,context) \
  56. { \
  57. (void) ThrowMagickException(&wand->exception,GetMagickModule(),severity, \
  58. tag,"`%s'",context); \
  59. return(MagickFalse); \
  60. }
  61. /*
  62. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  63. % %
  64. % %
  65. % %
  66. % M a g i c k G e t A n t i a l i a s %
  67. % %
  68. % %
  69. % %
  70. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  71. %
  72. % MagickGetAntialias() returns the antialias property associated with the
  73. % wand.
  74. %
  75. % The format of the MagickGetAntialias method is:
  76. %
  77. % MagickBooleanType MagickGetAntialias(const MagickWand *wand)
  78. %
  79. % A description of each parameter follows:
  80. %
  81. % o wand: The magick wand.
  82. %
  83. */
  84. WandExport MagickBooleanType MagickGetAntialias(const MagickWand *wand)
  85. {
  86. assert(wand != (const MagickWand *) NULL);
  87. assert(wand->signature == WandSignature);
  88. if (wand->debug != MagickFalse)
  89. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  90. return(wand->image_info->antialias);
  91. }
  92. /*
  93. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  94. % %
  95. % %
  96. % %
  97. % M a g i c k G e t C o m p r e s s i o n %
  98. % %
  99. % %
  100. % %
  101. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  102. %
  103. % MagickGetCompression() gets the wand compression.
  104. %
  105. % The format of the MagickGetCompression method is:
  106. %
  107. % CompressionType MagickGetCompression(MagickWand *wand)
  108. %
  109. % A description of each parameter follows:
  110. %
  111. % o wand: The magick wand.
  112. %
  113. */
  114. WandExport CompressionType MagickGetCompression(MagickWand *wand)
  115. {
  116. assert(wand != (MagickWand *) NULL);
  117. assert(wand->signature == WandSignature);
  118. if (wand->debug != MagickFalse)
  119. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  120. return(wand->image_info->compression);
  121. }
  122. /*
  123. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  124. % %
  125. % %
  126. % %
  127. % M a g i c k G e t C o m p r e s s i o n Q u a l i t y %
  128. % %
  129. % %
  130. % %
  131. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  132. %
  133. % MagickGetCompressionQuality() gets the wand compression quality.
  134. %
  135. % The format of the MagickGetCompressionQuality method is:
  136. %
  137. % unsigned long MagickGetCompressionQuality(MagickWand *wand)
  138. %
  139. % A description of each parameter follows:
  140. %
  141. % o wand: The magick wand.
  142. %
  143. */
  144. WandExport unsigned long MagickGetCompressionQuality(MagickWand *wand)
  145. {
  146. assert(wand != (MagickWand *) NULL);
  147. assert(wand->signature == WandSignature);
  148. if (wand->debug != MagickFalse)
  149. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  150. return(wand->image_info->quality);
  151. }
  152. /*
  153. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  154. % %
  155. % %
  156. % %
  157. % M a g i c k G e t C o p y r i g h t %
  158. % %
  159. % %
  160. % %
  161. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  162. %
  163. % MagickGetCopyright() returns the ImageMagick API copyright as a string
  164. % constant.
  165. %
  166. % The format of the MagickGetCopyright method is:
  167. %
  168. % const char *MagickGetCopyright(void)
  169. %
  170. */
  171. WandExport const char *MagickGetCopyright(void)
  172. {
  173. return(GetMagickCopyright());
  174. }
  175. /*
  176. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  177. % %
  178. % %
  179. % %
  180. % M a g i c k G e t E x c e p t i o n %
  181. % %
  182. % %
  183. % %
  184. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  185. %
  186. % MagickGetException() returns the severity, reason, and description of any
  187. % error that occurs when using other methods in this API.
  188. %
  189. % The format of the MagickGetException method is:
  190. %
  191. % char *MagickGetException(MagickWand *wand,ExceptionType *severity)
  192. %
  193. % A description of each parameter follows:
  194. %
  195. % o wand: The magick wand.
  196. %
  197. % o severity: The severity of the error is returned here.
  198. %
  199. */
  200. WandExport char *MagickGetException(MagickWand *wand,ExceptionType *severity)
  201. {
  202. char
  203. *description;
  204. assert(wand != (const MagickWand *) NULL);
  205. assert(wand->signature == WandSignature);
  206. if (wand->debug != MagickFalse)
  207. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  208. assert(severity != (ExceptionType *) NULL);
  209. *severity=wand->exception.severity;
  210. description=(char *) AcquireMagickMemory(2*MaxTextExtent);
  211. if (description == (char *) NULL)
  212. {
  213. (void) ThrowMagickException(&wand->exception,GetMagickModule(),WandError,
  214. "MemoryAllocationFailed","`%s'",wand->name);
  215. return((char *) NULL);
  216. }
  217. *description='\0';
  218. if (wand->exception.reason != (char *) NULL)
  219. (void) CopyMagickString(description,GetLocaleExceptionMessage(
  220. wand->exception.severity,wand->exception.reason),MaxTextExtent);
  221. if (wand->exception.description != (char *) NULL)
  222. {
  223. (void) ConcatenateMagickString(description," (",MaxTextExtent);
  224. (void) ConcatenateMagickString(description,GetLocaleExceptionMessage(
  225. wand->exception.severity,wand->exception.description),MaxTextExtent);
  226. (void) ConcatenateMagickString(description,")",MaxTextExtent);
  227. }
  228. return(description);
  229. }
  230. /*
  231. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  232. % %
  233. % %
  234. % %
  235. % M a g i c k G e t F i l e n a m e %
  236. % %
  237. % %
  238. % %
  239. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  240. %
  241. % MagickGetFilename() returns the filename associated with an image sequence.
  242. %
  243. % The format of the MagickGetFilename method is:
  244. %
  245. % const char *MagickGetFilename(const MagickWand *wand)
  246. %
  247. % A description of each parameter follows:
  248. %
  249. % o wand: The magick wand.
  250. %
  251. %
  252. */
  253. WandExport char *MagickGetFilename(const MagickWand *wand)
  254. {
  255. assert(wand != (const MagickWand *) NULL);
  256. assert(wand->signature == WandSignature);
  257. if (wand->debug != MagickFalse)
  258. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  259. return(AcquireString(wand->image_info->filename));
  260. }
  261. /*
  262. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  263. % %
  264. % %
  265. % %
  266. % M a g i c k G e t F o r m a t %
  267. % %
  268. % %
  269. % %
  270. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  271. %
  272. % MagickGetFormat() returns the format of the magick wand.
  273. %
  274. % The format of the MagickGetFormat method is:
  275. %
  276. % const char MagickGetFormat(MagickWand *wand)
  277. %
  278. % A description of each parameter follows:
  279. %
  280. % o wand: The magick wand.
  281. %
  282. */
  283. WandExport char *MagickGetFormat(MagickWand *wand)
  284. {
  285. assert(wand != (MagickWand *) NULL);
  286. assert(wand->signature == WandSignature);
  287. if (wand->debug != MagickFalse)
  288. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  289. return(AcquireString(wand->image_info->magick));
  290. }
  291. /*
  292. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  293. % %
  294. % %
  295. % %
  296. % M a g i c k G e t H o m e U R L %
  297. % %
  298. % %
  299. % %
  300. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  301. %
  302. % MagickGetHomeURL() returns the ImageMagick home URL.
  303. %
  304. % The format of the MagickGetHomeURL method is:
  305. %
  306. % char *MagickGetHomeURL(void)
  307. %
  308. */
  309. WandExport char *MagickGetHomeURL(void)
  310. {
  311. return(GetMagickHomeURL());
  312. }
  313. /*
  314. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  315. % %
  316. % %
  317. % %
  318. % M a g i c k G e t I n t e r l a c e S c h e m e %
  319. % %
  320. % %
  321. % %
  322. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  323. %
  324. % MagickGetInterlaceScheme() gets the wand interlace scheme.
  325. %
  326. % The format of the MagickGetInterlaceScheme method is:
  327. %
  328. % InterlaceType MagickGetInterlaceScheme(MagickWand *wand)
  329. %
  330. % A description of each parameter follows:
  331. %
  332. % o wand: The magick wand.
  333. %
  334. */
  335. WandExport InterlaceType MagickGetInterlaceScheme(MagickWand *wand)
  336. {
  337. assert(wand != (MagickWand *) NULL);
  338. assert(wand->signature == WandSignature);
  339. if (wand->debug != MagickFalse)
  340. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  341. return(wand->image_info->interlace);
  342. }
  343. /*
  344. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  345. % %
  346. % %
  347. % %
  348. % M a g i c k G e t I n t e r p o l a t e M e t h o d %
  349. % %
  350. % %
  351. % %
  352. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  353. %
  354. % MagickGetInterpolateMethod() gets the wand compression.
  355. %
  356. % The format of the MagickGetInterpolateMethod method is:
  357. %
  358. % InterpolatePixelMethod MagickGetInterpolateMethod(MagickWand *wand)
  359. %
  360. % A description of each parameter follows:
  361. %
  362. % o wand: The magick wand.
  363. %
  364. */
  365. WandExport InterpolatePixelMethod MagickGetInterpolateMethod(MagickWand *wand)
  366. {
  367. const char
  368. *option;
  369. InterpolatePixelMethod
  370. method;
  371. assert(wand != (MagickWand *) NULL);
  372. assert(wand->signature == WandSignature);
  373. if (wand->debug != MagickFalse)
  374. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  375. option=GetImageOption(wand->image_info,"interpolate");
  376. if (option == (const char *) NULL)
  377. return(UndefinedInterpolatePixel);
  378. method=(InterpolatePixelMethod) ParseMagickOption(MagickInterpolateOptions,
  379. MagickFalse,option);
  380. return(method);
  381. }
  382. /*
  383. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  384. % %
  385. % %
  386. % %
  387. % M a g i c k G e t O p t i o n %
  388. % %
  389. % %
  390. % %
  391. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  392. %
  393. % MagickGetOption() returns a value associated with a wand and the specified
  394. % key. Use MagickRelinquishMemory() to free the value when you are finished
  395. % with it.
  396. %
  397. % The format of the MagickGetOption method is:
  398. %
  399. % char *MagickGetOption(MagickWand *wand,const char *key)
  400. %
  401. % A description of each parameter follows:
  402. %
  403. % o wand: The magick wand.
  404. %
  405. % o key: The key.
  406. %
  407. */
  408. WandExport char *MagickGetOption(MagickWand *wand,const char *key)
  409. {
  410. const char
  411. *option;
  412. assert(wand != (MagickWand *) NULL);
  413. assert(wand->signature == WandSignature);
  414. if (wand->debug != MagickFalse)
  415. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  416. option=GetImageOption(wand->image_info,key);
  417. return(ConstantString(option));
  418. }
  419. /*
  420. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  421. % %
  422. % %
  423. % %
  424. % M a g i c k G e t P a c k a g e N a m e %
  425. % %
  426. % %
  427. % %
  428. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  429. %
  430. % MagickGetPackageName() returns the ImageMagick package name as a string
  431. % constant.
  432. %
  433. % The format of the MagickGetPackageName method is:
  434. %
  435. % const char *MagickGetPackageName(void)
  436. %
  437. %
  438. */
  439. WandExport const char *MagickGetPackageName(void)
  440. {
  441. return(GetMagickPackageName());
  442. }
  443. /*
  444. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  445. % %
  446. % %
  447. % %
  448. % M a g i c k G e t P a g e %
  449. % %
  450. % %
  451. % %
  452. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  453. %
  454. % MagickGetPage() returns the page geometry associated with the magick wand.
  455. %
  456. % The format of the MagickGetPage method is:
  457. %
  458. % MagickBooleanType MagickGetPage(const MagickWand *wand,
  459. % unsigned long *width,unsigned long *height,long *x,long *y)
  460. %
  461. % A description of each parameter follows:
  462. %
  463. % o wand: The magick wand.
  464. %
  465. % o width: The page width.
  466. %
  467. % o height: page height.
  468. %
  469. % o x: The page x-offset.
  470. %
  471. % o y: The page y-offset.
  472. %
  473. */
  474. WandExport MagickBooleanType MagickGetPage(const MagickWand *wand,
  475. unsigned long *width,unsigned long *height,long *x,long *y)
  476. {
  477. RectangleInfo
  478. geometry;
  479. assert(wand != (const MagickWand *) NULL);
  480. assert(wand->signature == WandSignature);
  481. if (wand->debug != MagickFalse)
  482. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  483. (void) ResetMagickMemory(&geometry,0,sizeof(geometry));
  484. (void) ParseAbsoluteGeometry(wand->image_info->page,&geometry);
  485. *width=geometry.width;
  486. *height=geometry.height;
  487. *x=geometry.x;
  488. *y=geometry.y;
  489. return(MagickTrue);
  490. }
  491. /*
  492. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  493. % %
  494. % %
  495. % %
  496. % M a g i c k G e t Q u a n t u m D e p t h %
  497. % %
  498. % %
  499. % %
  500. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  501. %
  502. % MagickGetQuantumDepth() returns the ImageMagick quantum depth as a string
  503. % constant.
  504. %
  505. % The format of the MagickGetQuantumDepth method is:
  506. %
  507. % const char *MagickGetQuantumDepth(unsigned long *depth)
  508. %
  509. % A description of each parameter follows:
  510. %
  511. % o depth: The quantum depth is returned as a number.
  512. %
  513. %
  514. */
  515. WandExport const char *MagickGetQuantumDepth(unsigned long *depth)
  516. {
  517. return(GetMagickQuantumDepth(depth));
  518. }
  519. /*
  520. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  521. % %
  522. % %
  523. % %
  524. % M a g i c k G e t Q u a n t u m R a n g e %
  525. % %
  526. % %
  527. % %
  528. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  529. %
  530. % MagickGetQuantumRange() returns the ImageMagick quantum range as a string
  531. % constant.
  532. %
  533. % The format of the MagickGetQuantumRange method is:
  534. %
  535. % const char *MagickGetQuantumRange(unsigned long *range)
  536. %
  537. % A description of each parameter follows:
  538. %
  539. % o range: The quantum range is returned as a number.
  540. %
  541. %
  542. */
  543. WandExport const char *MagickGetQuantumRange(unsigned long *range)
  544. {
  545. return(GetMagickQuantumRange(range));
  546. }
  547. /*
  548. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  549. % %
  550. % %
  551. % %
  552. % M a g i c k G e t R e l e a s e D a t e %
  553. % %
  554. % %
  555. % %
  556. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  557. %
  558. % MagickGetReleaseDate() returns the ImageMagick release date as a string
  559. % constant.
  560. %
  561. % The format of the MagickGetReleaseDate method is:
  562. %
  563. % const char *MagickGetReleaseDate(void)
  564. %
  565. */
  566. WandExport const char *MagickGetReleaseDate(void)
  567. {
  568. return(GetMagickReleaseDate());
  569. }
  570. /*
  571. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  572. % %
  573. % %
  574. % %
  575. % M a g i c k G e t R e s o u r c e %
  576. % %
  577. % %
  578. % %
  579. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  580. %
  581. % MagickGetResource() returns the specified resource in megabytes.
  582. %
  583. % The format of the MagickGetResource method is:
  584. %
  585. % unsigned long MagickGetResource(const ResourceType type)
  586. %
  587. % A description of each parameter follows:
  588. %
  589. % o wand: The magick wand.
  590. %
  591. */
  592. WandExport unsigned long MagickGetResource(const ResourceType type)
  593. {
  594. return(GetMagickResource(type));
  595. }
  596. /*
  597. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  598. % %
  599. % %
  600. % %
  601. % M a g i c k G e t R e s o u r c e L i m i t %
  602. % %
  603. % %
  604. % %
  605. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  606. %
  607. % MagickGetResourceLimit() returns the specified resource limit in megabytes.
  608. %
  609. % The format of the MagickGetResourceLimit method is:
  610. %
  611. % unsigned long MagickGetResourceLimit(const ResourceType type)
  612. %
  613. % A description of each parameter follows:
  614. %
  615. % o wand: The magick wand.
  616. %
  617. */
  618. WandExport unsigned long MagickGetResourceLimit(const ResourceType type)
  619. {
  620. return(GetMagickResourceLimit(type));
  621. }
  622. /*
  623. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  624. % %
  625. % %
  626. % %
  627. % M a g i c k G e t S a m p l i n g F a c t o r s %
  628. % %
  629. % %
  630. % %
  631. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  632. %
  633. % MagickGetSamplingFactors() gets the horizontal and vertical sampling factor.
  634. %
  635. % The format of the MagickGetSamplingFactors method is:
  636. %
  637. % double *MagickGetSamplingFactor(MagickWand *wand,
  638. % unsigned long *number_factors)
  639. %
  640. % A description of each parameter follows:
  641. %
  642. % o wand: The magick wand.
  643. %
  644. % o number_factors: The number of factors in the returned array.
  645. %
  646. */
  647. WandExport double *MagickGetSamplingFactors(MagickWand *wand,
  648. unsigned long *number_factors)
  649. {
  650. double
  651. *sampling_factors;
  652. register const char
  653. *p;
  654. register long
  655. i;
  656. assert(wand != (MagickWand *) NULL);
  657. assert(wand->signature == WandSignature);
  658. if (wand->debug != MagickFalse)
  659. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  660. *number_factors=0;
  661. sampling_factors=(double *) NULL;
  662. if (wand->image_info->sampling_factor == (char *) NULL)
  663. return(sampling_factors);
  664. i=0;
  665. for (p=wand->image_info->sampling_factor; p != (char *) NULL; p=strchr(p,','))
  666. {
  667. while (((int) *p != 0) && ((isspace((int) ((unsigned char) *p)) != 0) ||
  668. (*p == ',')))
  669. p++;
  670. i++;
  671. }
  672. sampling_factors=(double *) AcquireMagickMemory((size_t)
  673. i*sizeof(*sampling_factors));
  674. if (sampling_factors == (double *) NULL)
  675. ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
  676. wand->image_info->filename);
  677. i=0;
  678. for (p=wand->image_info->sampling_factor; p != (char *) NULL; p=strchr(p,','))
  679. {
  680. while (((int) *p != 0) && ((isspace((int) ((unsigned char) *p)) != 0) ||
  681. (*p == ',')))
  682. p++;
  683. sampling_factors[i]=atof(p);
  684. i++;
  685. }
  686. *number_factors=(unsigned long) i;
  687. return(sampling_factors);
  688. }
  689. /*
  690. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  691. % %
  692. % %
  693. % %
  694. % M a g i c k G e t S i z e %
  695. % %
  696. % %
  697. % %
  698. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  699. %
  700. % MagickGetSize() returns the size associated with the magick wand.
  701. %
  702. % The format of the MagickGetSize method is:
  703. %
  704. % MagickBooleanType MagickGetSize(const MagickWand *wand,
  705. % unsigned long *columns,unsigned long *rows)
  706. %
  707. % A description of each parameter follows:
  708. %
  709. % o wand: The magick wand.
  710. %
  711. % o columns: The width in pixels.
  712. %
  713. % o height: The height in pixels.
  714. %
  715. */
  716. WandExport MagickBooleanType MagickGetSize(const MagickWand *wand,
  717. unsigned long *columns,unsigned long *rows)
  718. {
  719. RectangleInfo
  720. geometry;
  721. assert(wand != (const MagickWand *) NULL);
  722. assert(wand->signature == WandSignature);
  723. if (wand->debug != MagickFalse)
  724. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  725. (void) ResetMagickMemory(&geometry,0,sizeof(geometry));
  726. (void) ParseAbsoluteGeometry(wand->image_info->size,&geometry);
  727. *columns=geometry.width;
  728. *rows=geometry.height;
  729. return(MagickTrue);
  730. }
  731. /*
  732. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  733. % %
  734. % %
  735. % %
  736. % M a g i c k G e t S i z e O f f s e t %
  737. % %
  738. % %
  739. % %
  740. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  741. %
  742. % MagickGetSizeOffset() returns the size offset associated with the magick
  743. % wand.
  744. %
  745. % The format of the MagickGetSizeOffset method is:
  746. %
  747. % MagickBooleanType MagickGetSizeOffset(const MagickWand *wand,
  748. % long *offset)
  749. %
  750. % A description of each parameter follows:
  751. %
  752. % o wand: The magick wand.
  753. %
  754. % o offset: The image offset.
  755. %
  756. */
  757. WandExport MagickBooleanType MagickGetSizeOffset(const MagickWand *wand,
  758. long *offset)
  759. {
  760. RectangleInfo
  761. geometry;
  762. assert(wand != (const MagickWand *) NULL);
  763. assert(wand->signature == WandSignature);
  764. if (wand->debug != MagickFalse)
  765. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  766. (void) ResetMagickMemory(&geometry,0,sizeof(geometry));
  767. (void) ParseAbsoluteGeometry(wand->image_info->size,&geometry);
  768. *offset=geometry.x;
  769. return(MagickTrue);
  770. }
  771. /*
  772. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  773. % %
  774. % %
  775. % %
  776. % M a g i c k G e t V e r s i o n %
  777. % %
  778. % %
  779. % %
  780. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  781. %
  782. % MagickGetVersion() returns the ImageMagick API version as a string constant
  783. % and as a number.
  784. %
  785. % The format of the MagickGetVersion method is:
  786. %
  787. % const char *MagickGetVersion(unsigned long *version)
  788. %
  789. % A description of each parameter follows:
  790. %
  791. % o version: The ImageMagick version is returned as a number.
  792. %
  793. */
  794. WandExport const char *MagickGetVersion(unsigned long *version)
  795. {
  796. return(GetMagickVersion(version));
  797. }
  798. /*
  799. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  800. % %
  801. % %
  802. % %
  803. % M a g i c k S e t A n t i a l i a s %
  804. % %
  805. % %
  806. % %
  807. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  808. %
  809. % MagickSetAntialias() sets the antialias propery of the wand.
  810. %
  811. % The format of the MagickSetAntialias method is:
  812. %
  813. % MagickBooleanType MagickSetAntialias(MagickWand *wand,
  814. % const MagickBooleanType antialias)
  815. %
  816. % A description of each parameter follows:
  817. %
  818. % o wand: The magick wand.
  819. %
  820. % o antialias: The antialias property.
  821. %
  822. */
  823. WandExport MagickBooleanType MagickSetAntialias(MagickWand *wand,
  824. const MagickBooleanType antialias)
  825. {
  826. assert(wand != (MagickWand *) NULL);
  827. assert(wand->signature == WandSignature);
  828. if (wand->debug != MagickFalse)
  829. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  830. wand->image_info->antialias=antialias;
  831. return(MagickTrue);
  832. }
  833. /*
  834. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  835. % %
  836. % %
  837. % %
  838. % M a g i c k S e t B a c k g r o u n d C o l o r %
  839. % %
  840. % %
  841. % %
  842. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  843. %
  844. % MagickSetBackgroundColor() sets the wand background color.
  845. %
  846. % The format of the MagickSetBackgroundColor method is:
  847. %
  848. % MagickBooleanType MagickSetBackgroundColor(MagickWand *wand,
  849. % const PixelWand *background)
  850. %
  851. % A description of each parameter follows:
  852. %
  853. % o wand: The magick wand.
  854. %
  855. % o background: The background pixel wand.
  856. %
  857. */
  858. WandExport MagickBooleanType MagickSetBackgroundColor(MagickWand *wand,
  859. const PixelWand *background)
  860. {
  861. assert(wand != (MagickWand *) NULL);
  862. assert(wand->signature == WandSignature);
  863. if (wand->debug != MagickFalse)
  864. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  865. PixelGetQuantumColor(background,&wand->image_info->background_color);
  866. return(MagickTrue);
  867. }
  868. /*
  869. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  870. % %
  871. % %
  872. % %
  873. % M a g i c k S e t C o m p r e s s i o n %
  874. % %
  875. % %
  876. % %
  877. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  878. %
  879. % MagickSetCompression() sets the wand compression type.
  880. %
  881. % The format of the MagickSetCompression method is:
  882. %
  883. % MagickBooleanType MagickSetCompression(MagickWand *wand,
  884. % const CompressionType compression)
  885. %
  886. % A description of each parameter follows:
  887. %
  888. % o wand: The magick wand.
  889. %
  890. % o compression: The wand compression.
  891. %
  892. */
  893. WandExport MagickBooleanType MagickSetCompression(MagickWand *wand,
  894. const CompressionType compression)
  895. {
  896. assert(wand != (MagickWand *) NULL);
  897. assert(wand->signature == WandSignature);
  898. if (wand->debug != MagickFalse)
  899. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  900. wand->image_info->compression=compression;
  901. return(MagickTrue);
  902. }
  903. /*
  904. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  905. % %
  906. % %
  907. % %
  908. % M a g i c k S e t C o m p r e s s i o n Q u a l i t y %
  909. % %
  910. % %
  911. % %
  912. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  913. %
  914. % MagickSetCompressionQuality() sets the wand compression quality.
  915. %
  916. % The format of the MagickSetCompressionQuality method is:
  917. %
  918. % MagickBooleanType MagickSetCompressionQuality(MagickWand *wand,
  919. % const unsigned long quality)
  920. %
  921. % A description of each parameter follows:
  922. %
  923. % o wand: The magick wand.
  924. %
  925. % o quality: The wand compression quality.
  926. %
  927. */
  928. WandExport MagickBooleanType MagickSetCompressionQuality(MagickWand *wand,
  929. const unsigned long quality)
  930. {
  931. assert(wand != (MagickWand *) NULL);
  932. assert(wand->signature == WandSignature);
  933. if (wand->debug != MagickFalse)
  934. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  935. wand->image_info->quality=quality;
  936. return(MagickTrue);
  937. }
  938. /*
  939. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  940. % %
  941. % %
  942. % %
  943. % M a g i c k S e t D e p t h %
  944. % %
  945. % %
  946. % %
  947. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  948. %
  949. % MagickSetDepth() sets the wand pixel depth.
  950. %
  951. % The format of the MagickSetDepth method is:
  952. %
  953. % MagickBooleanType MagickSetDepth(MagickWand *wand,
  954. % const unsigned long depth)
  955. %
  956. % A description of each parameter follows:
  957. %
  958. % o wand: The magick wand.
  959. %
  960. % o depth: The wand pixel depth.
  961. %
  962. */
  963. WandExport MagickBooleanType MagickSetDepth(MagickWand *wand,
  964. const unsigned long depth)
  965. {
  966. assert(wand != (MagickWand *) NULL);
  967. assert(wand->signature == WandSignature);
  968. if (wand->debug != MagickFalse)
  969. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  970. wand->image_info->depth=depth;
  971. return(MagickTrue);
  972. }
  973. /*
  974. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  975. % %
  976. % %
  977. % %
  978. % M a g i c k S e t F i l e n a m e %
  979. % %
  980. % %
  981. % %
  982. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  983. %
  984. % MagickSetFilename() sets the filename before you read or write an image file.
  985. %
  986. % The format of the MagickSetFilename method is:
  987. %
  988. % MagickBooleanType MagickSetFilename(MagickWand *wand,
  989. % const char *filename)
  990. %
  991. % A description of each parameter follows:
  992. %
  993. % o wand: The magick wand.
  994. %
  995. % o filename: The image filename.
  996. %
  997. */
  998. WandExport MagickBooleanType MagickSetFilename(MagickWand *wand,
  999. const char *filename)
  1000. {
  1001. assert(wand != (MagickWand *) NULL);
  1002. assert(wand->signature == WandSignature);
  1003. if (wand->debug != MagickFalse)
  1004. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  1005. if (filename != (const char *) NULL)
  1006. (void) CopyMagickString(wand->image_info->filename,filename,MaxTextExtent);
  1007. return(MagickTrue);
  1008. }
  1009. /*
  1010. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1011. % %
  1012. % %
  1013. % %
  1014. % M a g i c k S e t F o r m a t %
  1015. % %
  1016. % %
  1017. % %
  1018. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1019. %
  1020. % MagickSetFormat() sets the format of the magick wand.
  1021. %
  1022. % The format of the MagickSetFormat method is:
  1023. %
  1024. % MagickBooleanType MagickSetFormat(MagickWand *wand,const char *format)
  1025. %
  1026. % A description of each parameter follows:
  1027. %
  1028. % o wand: The magick wand.
  1029. %
  1030. % o format: The image format.
  1031. %
  1032. */
  1033. WandExport MagickBooleanType MagickSetFormat(MagickWand *wand,
  1034. const char *format)
  1035. {
  1036. const MagickInfo
  1037. *magick_info;
  1038. assert(wand != (MagickWand *) NULL);
  1039. assert(wand->signature == WandSignature);
  1040. if (wand->debug != MagickFalse)
  1041. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  1042. if ((format == (char *) NULL) || (*format == '\0'))
  1043. {
  1044. *wand->image_info->magick='\0';
  1045. return(MagickTrue);
  1046. }
  1047. magick_info=GetMagickInfo(format,&wand->exception);
  1048. if (magick_info == (const MagickInfo *) NULL)
  1049. return(MagickFalse);
  1050. ClearMagickException(&wand->exception);
  1051. (void) CopyMagickString(wand->image_info->magick,format,MaxTextExtent);
  1052. return(MagickTrue);
  1053. }
  1054. /*
  1055. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1056. % %
  1057. % %
  1058. % %
  1059. % M a g i c k S e t I n t e r l a c e S c h e m e %
  1060. % %
  1061. % %
  1062. % %
  1063. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1064. %
  1065. % MagickSetInterlaceScheme() sets the image compression.
  1066. %
  1067. % The format of the MagickSetInterlaceScheme method is:
  1068. %
  1069. % MagickBooleanType MagickSetInterlaceScheme(MagickWand *wand,
  1070. % const InterlaceType interlace_scheme)
  1071. %
  1072. % A description of each parameter follows:
  1073. %
  1074. % o wand: The magick wand.
  1075. %
  1076. % o interlace_scheme: The image interlace scheme: NoInterlace, LineInterlace,
  1077. % PlaneInterlace, PartitionInterlace.
  1078. %
  1079. */
  1080. WandExport MagickBooleanType MagickSetInterlaceScheme(MagickWand *wand,
  1081. const InterlaceType interlace_scheme)
  1082. {
  1083. assert(wand != (MagickWand *) NULL);
  1084. assert(wand->signature == WandSignature);
  1085. if (wand->debug != MagickFalse)
  1086. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  1087. wand->image_info->interlace=interlace_scheme;
  1088. return(MagickTrue);
  1089. }
  1090. /*
  1091. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1092. % %
  1093. % %
  1094. % %
  1095. % M a g i c k S e t I n t e r p o l a t e M e t h o d %
  1096. % %
  1097. % %
  1098. % %
  1099. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1100. %
  1101. % MagickSetInterpolateMethod() sets the interpolate pixel method.
  1102. %
  1103. % The format of the MagickSetInterpolateMethod method is:
  1104. %
  1105. % MagickBooleanType MagickSetInterpolateMethod(MagickWand *wand,
  1106. % const InterpolateMethodPixel method)
  1107. %
  1108. % A description of each parameter follows:
  1109. %
  1110. % o wand: The magick wand.
  1111. %
  1112. % o method: The interpolate pixel method.
  1113. %
  1114. */
  1115. WandExport MagickBooleanType MagickSetInterpolateMethod(MagickWand *wand,
  1116. const InterpolatePixelMethod method)
  1117. {
  1118. MagickBooleanType
  1119. status;
  1120. assert(wand != (MagickWand *) NULL);
  1121. assert(wand->signature == WandSignature);
  1122. if (wand->debug != MagickFalse)
  1123. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  1124. status=SetImageOption(wand->image_info,"interpolate",
  1125. MagickOptionToMnemonic(MagickInterpolateOptions,(long) method));
  1126. return(status);
  1127. }
  1128. /*
  1129. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1130. % %
  1131. % %
  1132. % %
  1133. % M a g i c k S e t O p t i o n %
  1134. % %
  1135. % %
  1136. % %
  1137. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1138. %
  1139. % MagickSetOption() associates one or options with the wand (.e.g
  1140. % MagickSetOption(wand,"jpeg:perserve","yes")).
  1141. %
  1142. % The format of the MagickSetOption method is:
  1143. %
  1144. % MagickBooleanType MagickSetOption(MagickWand *wand,const char *key,
  1145. % const char *value)
  1146. %
  1147. % A description of each parameter follows:
  1148. %
  1149. % o wand: The magick wand.
  1150. %
  1151. % o key: The key.
  1152. %
  1153. % o value: The value.
  1154. %
  1155. */
  1156. WandExport MagickBooleanType MagickSetOption(MagickWand *wand,const char *key,
  1157. const char *value)
  1158. {
  1159. assert(wand != (MagickWand *) NULL);
  1160. assert(wand->signature == WandSignature);
  1161. if (wand->debug != MagickFalse)
  1162. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  1163. return(SetImageOption(wand->image_info,key,value));
  1164. }
  1165. /*
  1166. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1167. % %
  1168. % %
  1169. % %
  1170. % M a g i c k S e t P a g e %
  1171. % %
  1172. % %
  1173. % %
  1174. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1175. %
  1176. % MagickSetPage() sets the page geometry of the magick wand.
  1177. %
  1178. % The format of the MagickSetPage method is:
  1179. %
  1180. % MagickBooleanType MagickSetPage(MagickWand *wand,
  1181. % const unsigned long width,const unsigned long height,const long x,
  1182. % const long y)
  1183. %
  1184. % A description of each parameter follows:
  1185. %
  1186. % o wand: Theā€¦

Large files files are truncated, but you can click here to view the full file