PageRenderTime 187ms CodeModel.GetById 22ms RepoModel.GetById 6ms app.codeStats 1ms

/MagickWand/magick-property.c

https://gitlab.com/ImageMagick/ImageMagick
C | 3051 lines | 1101 code | 107 blank | 1843 comment | 371 complexity | dec5cf4ccd3ce1e53af31db1f6a53539 MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception

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, Options, or Profiles %
  20. % %
  21. % Software Design %
  22. % Cristy %
  23. % August 2003 %
  24. % %
  25. % %
  26. % Copyright 1999-2019 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. % https://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 "MagickWand/studio.h"
  49. #include "MagickWand/MagickWand.h"
  50. #include "MagickWand/magick-wand-private.h"
  51. #include "MagickWand/wand.h"
  52. #include "MagickCore/string-private.h"
  53. /*
  54. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  55. % %
  56. % %
  57. % %
  58. % M a g i c k D e l e t e I m a g e A r t i f a c t %
  59. % %
  60. % %
  61. % %
  62. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  63. %
  64. % MagickDeleteImageArtifact() deletes a wand artifact.
  65. %
  66. % The format of the MagickDeleteImageArtifact method is:
  67. %
  68. % MagickBooleanType MagickDeleteImageArtifact(MagickWand *wand,
  69. % const char *artifact)
  70. %
  71. % A description of each parameter follows:
  72. %
  73. % o image: the image.
  74. %
  75. % o artifact: the image artifact.
  76. %
  77. */
  78. WandExport MagickBooleanType MagickDeleteImageArtifact(MagickWand *wand,
  79. const char *artifact)
  80. {
  81. assert(wand != (MagickWand *) NULL);
  82. assert(wand->signature == MagickWandSignature);
  83. if (wand->debug != MagickFalse)
  84. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  85. if (wand->images == (Image *) NULL)
  86. {
  87. (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
  88. "ContainsNoImages","`%s'",wand->name);
  89. return(MagickFalse);
  90. }
  91. return(DeleteImageArtifact(wand->images,artifact));
  92. }
  93. /*
  94. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  95. % %
  96. % %
  97. % %
  98. % M a g i c k D e l e t e I m a g e P r o p e r t y %
  99. % %
  100. % %
  101. % %
  102. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  103. %
  104. % MagickDeleteImageProperty() deletes a wand property.
  105. %
  106. % The format of the MagickDeleteImageProperty method is:
  107. %
  108. % MagickBooleanType MagickDeleteImageProperty(MagickWand *wand,
  109. % const char *property)
  110. %
  111. % A description of each parameter follows:
  112. %
  113. % o image: the image.
  114. %
  115. % o property: the image property.
  116. %
  117. */
  118. WandExport MagickBooleanType MagickDeleteImageProperty(MagickWand *wand,
  119. const char *property)
  120. {
  121. assert(wand != (MagickWand *) NULL);
  122. assert(wand->signature == MagickWandSignature);
  123. if (wand->debug != MagickFalse)
  124. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  125. if (wand->images == (Image *) NULL)
  126. {
  127. (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
  128. "ContainsNoImages","`%s'",wand->name);
  129. return(MagickFalse);
  130. }
  131. return(DeleteImageProperty(wand->images,property));
  132. }
  133. /*
  134. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  135. % %
  136. % %
  137. % %
  138. % M a g i c k D e l e t e O p t i o n %
  139. % %
  140. % %
  141. % %
  142. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  143. %
  144. % MagickDeleteOption() deletes a wand option.
  145. %
  146. % The format of the MagickDeleteOption method is:
  147. %
  148. % MagickBooleanType MagickDeleteOption(MagickWand *wand,
  149. % const char *option)
  150. %
  151. % A description of each parameter follows:
  152. %
  153. % o image: the image.
  154. %
  155. % o option: the image option.
  156. %
  157. */
  158. WandExport MagickBooleanType MagickDeleteOption(MagickWand *wand,
  159. const char *option)
  160. {
  161. assert(wand != (MagickWand *) NULL);
  162. assert(wand->signature == MagickWandSignature);
  163. if (wand->debug != MagickFalse)
  164. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  165. return(DeleteImageOption(wand->image_info,option));
  166. }
  167. /*
  168. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  169. % %
  170. % %
  171. % %
  172. % M a g i c k G e t A n t i a l i a s %
  173. % %
  174. % %
  175. % %
  176. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  177. %
  178. % MagickGetAntialias() returns the antialias property associated with the
  179. % wand.
  180. %
  181. % The format of the MagickGetAntialias method is:
  182. %
  183. % MagickBooleanType MagickGetAntialias(const MagickWand *wand)
  184. %
  185. % A description of each parameter follows:
  186. %
  187. % o wand: the magick wand.
  188. %
  189. */
  190. WandExport MagickBooleanType MagickGetAntialias(const MagickWand *wand)
  191. {
  192. assert(wand != (const MagickWand *) NULL);
  193. assert(wand->signature == MagickWandSignature);
  194. if (wand->debug != MagickFalse)
  195. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  196. return(wand->image_info->antialias);
  197. }
  198. /*
  199. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  200. % %
  201. % %
  202. % %
  203. % M a g i c k G e t B a c k g r o u n d C o l o r %
  204. % %
  205. % %
  206. % %
  207. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  208. %
  209. % MagickGetBackgroundColor() returns the wand background color.
  210. %
  211. % The format of the MagickGetBackgroundColor method is:
  212. %
  213. % PixelWand *MagickGetBackgroundColor(MagickWand *wand)
  214. %
  215. % A description of each parameter follows:
  216. %
  217. % o wand: the magick wand.
  218. %
  219. */
  220. WandExport PixelWand *MagickGetBackgroundColor(MagickWand *wand)
  221. {
  222. PixelWand
  223. *background_color;
  224. assert(wand != (MagickWand *) NULL);
  225. assert(wand->signature == MagickWandSignature);
  226. if (wand->debug != MagickFalse)
  227. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  228. background_color=NewPixelWand();
  229. PixelSetPixelColor(background_color,&wand->image_info->background_color);
  230. return(background_color);
  231. }
  232. /*
  233. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  234. % %
  235. % %
  236. % %
  237. % M a g i c k G e t C o l o r s p a c e %
  238. % %
  239. % %
  240. % %
  241. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  242. %
  243. % MagickGetColorspace() gets the wand colorspace type.
  244. %
  245. % The format of the MagickGetColorspace method is:
  246. %
  247. % ColorspaceType MagickGetColorspace(MagickWand *wand)
  248. %
  249. % A description of each parameter follows:
  250. %
  251. % o wand: the magick wand.
  252. %
  253. */
  254. WandExport ColorspaceType MagickGetColorspace(MagickWand *wand)
  255. {
  256. assert(wand != (MagickWand *) NULL);
  257. assert(wand->signature == MagickWandSignature);
  258. if (wand->debug != MagickFalse)
  259. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  260. return(wand->image_info->colorspace);
  261. }
  262. /*
  263. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  264. % %
  265. % %
  266. % %
  267. % M a g i c k G e t C o m p r e s s i o n %
  268. % %
  269. % %
  270. % %
  271. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  272. %
  273. % MagickGetCompression() gets the wand compression type.
  274. %
  275. % The format of the MagickGetCompression method is:
  276. %
  277. % CompressionType MagickGetCompression(MagickWand *wand)
  278. %
  279. % A description of each parameter follows:
  280. %
  281. % o wand: the magick wand.
  282. %
  283. */
  284. WandExport CompressionType MagickGetCompression(MagickWand *wand)
  285. {
  286. assert(wand != (MagickWand *) NULL);
  287. assert(wand->signature == MagickWandSignature);
  288. if (wand->debug != MagickFalse)
  289. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  290. return(wand->image_info->compression);
  291. }
  292. /*
  293. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  294. % %
  295. % %
  296. % %
  297. % 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 %
  298. % %
  299. % %
  300. % %
  301. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  302. %
  303. % MagickGetCompressionQuality() gets the wand compression quality.
  304. %
  305. % The format of the MagickGetCompressionQuality method is:
  306. %
  307. % size_t MagickGetCompressionQuality(MagickWand *wand)
  308. %
  309. % A description of each parameter follows:
  310. %
  311. % o wand: the magick wand.
  312. %
  313. */
  314. WandExport size_t MagickGetCompressionQuality(MagickWand *wand)
  315. {
  316. assert(wand != (MagickWand *) NULL);
  317. assert(wand->signature == MagickWandSignature);
  318. if (wand->debug != MagickFalse)
  319. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  320. return(wand->image_info->quality);
  321. }
  322. /*
  323. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  324. % %
  325. % %
  326. % %
  327. % M a g i c k G e t C o p y r i g h t %
  328. % %
  329. % %
  330. % %
  331. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  332. %
  333. % MagickGetCopyright() returns the ImageMagick API copyright as a string
  334. % constant.
  335. %
  336. % The format of the MagickGetCopyright method is:
  337. %
  338. % const char *MagickGetCopyright(void)
  339. %
  340. */
  341. WandExport const char *MagickGetCopyright(void)
  342. {
  343. return(GetMagickCopyright());
  344. }
  345. /*
  346. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  347. % %
  348. % %
  349. % %
  350. % M a g i c k G e t F i l e n a m e %
  351. % %
  352. % %
  353. % %
  354. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  355. %
  356. % MagickGetFilename() returns the filename associated with an image sequence.
  357. %
  358. % The format of the MagickGetFilename method is:
  359. %
  360. % const char *MagickGetFilename(const MagickWand *wand)
  361. %
  362. % A description of each parameter follows:
  363. %
  364. % o wand: the magick wand.
  365. %
  366. */
  367. WandExport char *MagickGetFilename(const MagickWand *wand)
  368. {
  369. assert(wand != (const MagickWand *) NULL);
  370. assert(wand->signature == MagickWandSignature);
  371. if (wand->debug != MagickFalse)
  372. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  373. return(AcquireString(wand->image_info->filename));
  374. }
  375. /*
  376. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  377. % %
  378. % %
  379. % %
  380. % M a g i c k G e t F o n t %
  381. % %
  382. % %
  383. % %
  384. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  385. %
  386. % MagickGetFont() returns the font associated with the MagickWand.
  387. %
  388. % The format of the MagickGetFont method is:
  389. %
  390. % char *MagickGetFont(MagickWand *wand)
  391. %
  392. % A description of each parameter follows:
  393. %
  394. % o wand: the magick wand.
  395. %
  396. */
  397. WandExport char *MagickGetFont(MagickWand *wand)
  398. {
  399. assert(wand != (MagickWand *) NULL);
  400. assert(wand->signature == MagickWandSignature);
  401. if (wand->debug != MagickFalse)
  402. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  403. if (wand->image_info->font == (char *) NULL)
  404. return((char *) NULL);
  405. return(AcquireString(wand->image_info->font));
  406. }
  407. /*
  408. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  409. % %
  410. % %
  411. % %
  412. % M a g i c k G e t F o r m a t %
  413. % %
  414. % %
  415. % %
  416. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  417. %
  418. % MagickGetFormat() returns the format of the magick wand.
  419. %
  420. % The format of the MagickGetFormat method is:
  421. %
  422. % const char MagickGetFormat(MagickWand *wand)
  423. %
  424. % A description of each parameter follows:
  425. %
  426. % o wand: the magick wand.
  427. %
  428. */
  429. WandExport char *MagickGetFormat(MagickWand *wand)
  430. {
  431. assert(wand != (MagickWand *) NULL);
  432. assert(wand->signature == MagickWandSignature);
  433. if (wand->debug != MagickFalse)
  434. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  435. return(AcquireString(wand->image_info->magick));
  436. }
  437. /*
  438. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  439. % %
  440. % %
  441. % %
  442. % M a g i c k G e t G r a v i t y %
  443. % %
  444. % %
  445. % %
  446. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  447. %
  448. % MagickGetGravity() gets the wand gravity.
  449. %
  450. % The format of the MagickGetGravity method is:
  451. %
  452. % GravityType MagickGetGravity(MagickWand *wand)
  453. %
  454. % A description of each parameter follows:
  455. %
  456. % o wand: the magick wand.
  457. %
  458. */
  459. WandExport GravityType MagickGetGravity(MagickWand *wand)
  460. {
  461. const char
  462. *option;
  463. GravityType
  464. type;
  465. assert(wand != (MagickWand *) NULL);
  466. assert(wand->signature == MagickWandSignature);
  467. if (wand->debug != MagickFalse)
  468. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  469. option=GetImageOption(wand->image_info,"gravity");
  470. if (option == (const char *) NULL)
  471. return(UndefinedGravity);
  472. type=(GravityType) ParseCommandOption(MagickGravityOptions,MagickFalse,option);
  473. return(type);
  474. }
  475. /*
  476. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  477. % %
  478. % %
  479. % %
  480. % M a g i c k G e t H o m e U R L %
  481. % %
  482. % %
  483. % %
  484. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  485. %
  486. % MagickGetHomeURL() returns the ImageMagick home URL.
  487. %
  488. % The format of the MagickGetHomeURL method is:
  489. %
  490. % char *MagickGetHomeURL(void)
  491. %
  492. */
  493. WandExport char *MagickGetHomeURL(void)
  494. {
  495. return(GetMagickHomeURL());
  496. }
  497. /*
  498. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  499. % %
  500. % %
  501. % %
  502. % M a g i c k G e t I m a g e A r t i f a c t %
  503. % %
  504. % %
  505. % %
  506. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  507. %
  508. % MagickGetImageArtifact() returns a value associated with the specified
  509. % artifact. Use MagickRelinquishMemory() to free the value when you are
  510. % finished with it.
  511. %
  512. % The format of the MagickGetImageArtifact method is:
  513. %
  514. % char *MagickGetImageArtifact(MagickWand *wand,const char *artifact)
  515. %
  516. % A description of each parameter follows:
  517. %
  518. % o wand: the magick wand.
  519. %
  520. % o artifact: the artifact.
  521. %
  522. */
  523. WandExport char *MagickGetImageArtifact(MagickWand *wand,const char *artifact)
  524. {
  525. const char
  526. *value;
  527. assert(wand != (MagickWand *) NULL);
  528. assert(wand->signature == MagickWandSignature);
  529. if (wand->debug != MagickFalse)
  530. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  531. if (wand->images == (Image *) NULL)
  532. {
  533. (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
  534. "ContainsNoImages","`%s'",wand->name);
  535. return((char *) NULL);
  536. }
  537. value=GetImageArtifact(wand->images,artifact);
  538. if (value == (const char *) NULL)
  539. return((char *) NULL);
  540. return(ConstantString(value));
  541. }
  542. /*
  543. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  544. % %
  545. % %
  546. % %
  547. % M a g i c k G e t I m a g e P r o p e r t i e s %
  548. % %
  549. % %
  550. % %
  551. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  552. %
  553. % MagickGetImageArtifacts() returns all the artifact names that match the
  554. % specified pattern associated with a wand. Use MagickGetImageProperty() to
  555. % return the value of a particular artifact. Use MagickRelinquishMemory() to
  556. % free the value when you are finished with it.
  557. %
  558. % The format of the MagickGetImageArtifacts method is:
  559. %
  560. % char *MagickGetImageArtifacts(MagickWand *wand,
  561. % const char *pattern,size_t *number_artifacts)
  562. %
  563. % A description of each parameter follows:
  564. %
  565. % o wand: the magick wand.
  566. %
  567. % o pattern: Specifies a pointer to a text string containing a pattern.
  568. %
  569. % o number_artifacts: the number artifacts associated with this wand.
  570. %
  571. */
  572. WandExport char **MagickGetImageArtifacts(MagickWand *wand,
  573. const char *pattern,size_t *number_artifacts)
  574. {
  575. char
  576. **artifacts;
  577. const char
  578. *artifact;
  579. register ssize_t
  580. i;
  581. size_t
  582. length;
  583. assert(wand != (MagickWand *) NULL);
  584. assert(wand->signature == MagickWandSignature);
  585. if (wand->debug != MagickFalse)
  586. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  587. if (wand->images == (Image *) NULL)
  588. {
  589. (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
  590. "ContainsNoImages","`%s'",wand->name);
  591. return((char **) NULL);
  592. }
  593. (void) GetImageProperty(wand->images,"exif:*",wand->exception);
  594. length=1024;
  595. artifacts=(char **) AcquireQuantumMemory(length,sizeof(*artifacts));
  596. if (artifacts == (char **) NULL)
  597. return((char **) NULL);
  598. ResetImagePropertyIterator(wand->images);
  599. artifact=GetNextImageProperty(wand->images);
  600. for (i=0; artifact != (const char *) NULL; )
  601. {
  602. if ((*artifact != '[') &&
  603. (GlobExpression(artifact,pattern,MagickFalse) != MagickFalse))
  604. {
  605. if ((i+1) >= (ssize_t) length)
  606. {
  607. length<<=1;
  608. artifacts=(char **) ResizeQuantumMemory(artifacts,length,
  609. sizeof(*artifacts));
  610. if (artifacts == (char **) NULL)
  611. {
  612. (void) ThrowMagickException(wand->exception,GetMagickModule(),
  613. ResourceLimitError,"MemoryAllocationFailed","`%s'",
  614. wand->name);
  615. return((char **) NULL);
  616. }
  617. }
  618. artifacts[i]=ConstantString(artifact);
  619. i++;
  620. }
  621. artifact=GetNextImageProperty(wand->images);
  622. }
  623. artifacts[i]=(char *) NULL;
  624. *number_artifacts=(size_t) i;
  625. return(artifacts);
  626. }
  627. /*
  628. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  629. % %
  630. % %
  631. % %
  632. % M a g i c k G e t I m a g e P r o f i l e %
  633. % %
  634. % %
  635. % %
  636. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  637. %
  638. % MagickGetImageProfile() returns the named image profile.
  639. %
  640. % The format of the MagickGetImageProfile method is:
  641. %
  642. % unsigned char *MagickGetImageProfile(MagickWand *wand,const char *name,
  643. % size_t *length)
  644. %
  645. % A description of each parameter follows:
  646. %
  647. % o wand: the magick wand.
  648. %
  649. % o name: Name of profile to return: ICC, IPTC, or generic profile.
  650. %
  651. % o length: the length of the profile.
  652. %
  653. */
  654. WandExport unsigned char *MagickGetImageProfile(MagickWand *wand,
  655. const char *name,size_t *length)
  656. {
  657. const StringInfo
  658. *profile;
  659. unsigned char
  660. *datum;
  661. assert(wand != (MagickWand *) NULL);
  662. assert(wand->signature == MagickWandSignature);
  663. if (wand->debug != MagickFalse)
  664. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  665. if (wand->images == (Image *) NULL)
  666. {
  667. (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
  668. "ContainsNoImages","`%s'",wand->name);
  669. return((unsigned char *) NULL);
  670. }
  671. *length=0;
  672. if (wand->images->profiles == (SplayTreeInfo *) NULL)
  673. return((unsigned char *) NULL);
  674. profile=GetImageProfile(wand->images,name);
  675. if (profile == (StringInfo *) NULL)
  676. return((unsigned char *) NULL);
  677. datum=(unsigned char *) AcquireQuantumMemory(GetStringInfoLength(profile),
  678. sizeof(*datum));
  679. if (datum == (unsigned char *) NULL)
  680. return((unsigned char *) NULL);
  681. (void) memcpy(datum,GetStringInfoDatum(profile),
  682. GetStringInfoLength(profile));
  683. *length=(size_t) GetStringInfoLength(profile);
  684. return(datum);
  685. }
  686. /*
  687. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  688. % %
  689. % %
  690. % %
  691. % M a g i c k G e t I m a g e P r o f i l e s %
  692. % %
  693. % %
  694. % %
  695. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  696. %
  697. % MagickGetImageProfiles() returns all the profile names that match the
  698. % specified pattern associated with a wand. Use MagickGetImageProfile() to
  699. % return the value of a particular property. Use MagickRelinquishMemory() to
  700. % free the value when you are finished with it.
  701. %
  702. % The format of the MagickGetImageProfiles method is:
  703. %
  704. % char *MagickGetImageProfiles(MagickWand *wand,const char *pattern,
  705. % size_t *number_profiles)
  706. %
  707. % A description of each parameter follows:
  708. %
  709. % o wand: the magick wand.
  710. %
  711. % o pattern: Specifies a pointer to a text string containing a pattern.
  712. %
  713. % o number_profiles: the number profiles associated with this wand.
  714. %
  715. */
  716. WandExport char **MagickGetImageProfiles(MagickWand *wand,const char *pattern,
  717. size_t *number_profiles)
  718. {
  719. char
  720. **profiles;
  721. const char
  722. *property;
  723. register ssize_t
  724. i;
  725. size_t
  726. length;
  727. assert(wand != (MagickWand *) NULL);
  728. assert(wand->signature == MagickWandSignature);
  729. if (wand->debug != MagickFalse)
  730. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  731. if (wand->images == (Image *) NULL)
  732. {
  733. (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
  734. "ContainsNoImages","`%s'",wand->name);
  735. return((char **) NULL);
  736. }
  737. (void) GetImageProfile(wand->images,"exif:*");
  738. length=1024;
  739. profiles=(char **) AcquireQuantumMemory(length,sizeof(*profiles));
  740. if (profiles == (char **) NULL)
  741. return((char **) NULL);
  742. ResetImageProfileIterator(wand->images);
  743. property=GetNextImageProfile(wand->images);
  744. for (i=0; property != (const char *) NULL; )
  745. {
  746. if ((*property != '[') &&
  747. (GlobExpression(property,pattern,MagickFalse) != MagickFalse))
  748. {
  749. if ((i+1) >= (ssize_t) length)
  750. {
  751. length<<=1;
  752. profiles=(char **) ResizeQuantumMemory(profiles,length,
  753. sizeof(*profiles));
  754. if (profiles == (char **) NULL)
  755. {
  756. (void) ThrowMagickException(wand->exception,GetMagickModule(),
  757. ResourceLimitError,"MemoryAllocationFailed","`%s'",
  758. wand->name);
  759. return((char **) NULL);
  760. }
  761. }
  762. profiles[i]=ConstantString(property);
  763. i++;
  764. }
  765. property=GetNextImageProfile(wand->images);
  766. }
  767. profiles[i]=(char *) NULL;
  768. *number_profiles=(size_t) i;
  769. return(profiles);
  770. }
  771. /*
  772. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  773. % %
  774. % %
  775. % %
  776. % M a g i c k G e t I m a g e P r o p e r t y %
  777. % %
  778. % %
  779. % %
  780. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  781. %
  782. % MagickGetImageProperty() returns a value associated with the specified
  783. % property. Use MagickRelinquishMemory() to free the value when you are
  784. % finished with it.
  785. %
  786. % The format of the MagickGetImageProperty method is:
  787. %
  788. % char *MagickGetImageProperty(MagickWand *wand,const char *property)
  789. %
  790. % A description of each parameter follows:
  791. %
  792. % o wand: the magick wand.
  793. %
  794. % o property: the property.
  795. %
  796. */
  797. WandExport char *MagickGetImageProperty(MagickWand *wand,const char *property)
  798. {
  799. const char
  800. *value;
  801. assert(wand != (MagickWand *) NULL);
  802. assert(wand->signature == MagickWandSignature);
  803. if (wand->debug != MagickFalse)
  804. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  805. if (wand->images == (Image *) NULL)
  806. {
  807. (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
  808. "ContainsNoImages","`%s'",wand->name);
  809. return((char *) NULL);
  810. }
  811. value=GetImageProperty(wand->images,property,wand->exception);
  812. if (value == (const char *) NULL)
  813. return((char *) NULL);
  814. return(ConstantString(value));
  815. }
  816. /*
  817. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  818. % %
  819. % %
  820. % %
  821. % M a g i c k G e t I m a g e P r o p e r t i e s %
  822. % %
  823. % %
  824. % %
  825. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  826. %
  827. % MagickGetImageProperties() returns all the property names that match the
  828. % specified pattern associated with a wand. Use MagickGetImageProperty() to
  829. % return the value of a particular property. Use MagickRelinquishMemory() to
  830. % free the value when you are finished with it.
  831. %
  832. % The format of the MagickGetImageProperties method is:
  833. %
  834. % char *MagickGetImageProperties(MagickWand *wand,
  835. % const char *pattern,size_t *number_properties)
  836. %
  837. % A description of each parameter follows:
  838. %
  839. % o wand: the magick wand.
  840. %
  841. % o pattern: Specifies a pointer to a text string containing a pattern.
  842. %
  843. % o number_properties: the number properties associated with this wand.
  844. %
  845. */
  846. WandExport char **MagickGetImageProperties(MagickWand *wand,
  847. const char *pattern,size_t *number_properties)
  848. {
  849. char
  850. **properties;
  851. const char
  852. *property;
  853. register ssize_t
  854. i;
  855. size_t
  856. length;
  857. assert(wand != (MagickWand *) NULL);
  858. assert(wand->signature == MagickWandSignature);
  859. if (wand->debug != MagickFalse)
  860. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  861. if (wand->images == (Image *) NULL)
  862. {
  863. (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
  864. "ContainsNoImages","`%s'",wand->name);
  865. return((char **) NULL);
  866. }
  867. (void) GetImageProperty(wand->images,"exif:*",wand->exception);
  868. length=1024;
  869. properties=(char **) AcquireQuantumMemory(length,sizeof(*properties));
  870. if (properties == (char **) NULL)
  871. return((char **) NULL);
  872. ResetImagePropertyIterator(wand->images);
  873. property=GetNextImageProperty(wand->images);
  874. for (i=0; property != (const char *) NULL; )
  875. {
  876. if ((*property != '[') &&
  877. (GlobExpression(property,pattern,MagickFalse) != MagickFalse))
  878. {
  879. if ((i+1) >= (ssize_t) length)
  880. {
  881. length<<=1;
  882. properties=(char **) ResizeQuantumMemory(properties,length,
  883. sizeof(*properties));
  884. if (properties == (char **) NULL)
  885. {
  886. (void) ThrowMagickException(wand->exception,GetMagickModule(),
  887. ResourceLimitError,"MemoryAllocationFailed","`%s'",
  888. wand->name);
  889. return((char **) NULL);
  890. }
  891. }
  892. properties[i]=ConstantString(property);
  893. i++;
  894. }
  895. property=GetNextImageProperty(wand->images);
  896. }
  897. properties[i]=(char *) NULL;
  898. *number_properties=(size_t) i;
  899. return(properties);
  900. }
  901. /*
  902. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  903. % %
  904. % %
  905. % %
  906. % M a g i c k G e t I n t e r l a c e S c h e m e %
  907. % %
  908. % %
  909. % %
  910. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  911. %
  912. % MagickGetInterlaceScheme() gets the wand interlace scheme.
  913. %
  914. % The format of the MagickGetInterlaceScheme method is:
  915. %
  916. % InterlaceType MagickGetInterlaceScheme(MagickWand *wand)
  917. %
  918. % A description of each parameter follows:
  919. %
  920. % o wand: the magick wand.
  921. %
  922. */
  923. WandExport InterlaceType MagickGetInterlaceScheme(MagickWand *wand)
  924. {
  925. assert(wand != (MagickWand *) NULL);
  926. assert(wand->signature == MagickWandSignature);
  927. if (wand->debug != MagickFalse)
  928. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  929. return(wand->image_info->interlace);
  930. }
  931. /*
  932. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  933. % %
  934. % %
  935. % %
  936. % 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 %
  937. % %
  938. % %
  939. % %
  940. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  941. %
  942. % MagickGetInterpolateMethod() gets the wand compression.
  943. %
  944. % The format of the MagickGetInterpolateMethod method is:
  945. %
  946. % PixelInterpolateMethod MagickGetInterpolateMethod(MagickWand *wand)
  947. %
  948. % A description of each parameter follows:
  949. %
  950. % o wand: the magick wand.
  951. %
  952. */
  953. WandExport PixelInterpolateMethod MagickGetInterpolateMethod(MagickWand *wand)
  954. {
  955. const char
  956. *option;
  957. PixelInterpolateMethod
  958. method;
  959. assert(wand != (MagickWand *) NULL);
  960. assert(wand->signature == MagickWandSignature);
  961. if (wand->debug != MagickFalse)
  962. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  963. option=GetImageOption(wand->image_info,"interpolate");
  964. if (option == (const char *) NULL)
  965. return(UndefinedInterpolatePixel);
  966. method=(PixelInterpolateMethod) ParseCommandOption(MagickInterpolateOptions,
  967. MagickFalse,option);
  968. return(method);
  969. }
  970. /*
  971. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  972. % %
  973. % %
  974. % %
  975. % M a g i c k G e t O p t i o n %
  976. % %
  977. % %
  978. % %
  979. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  980. %
  981. % MagickGetOption() returns a value associated with a wand and the specified
  982. % key. Use MagickRelinquishMemory() to free the value when you are finished
  983. % with it.
  984. %
  985. % The format of the MagickGetOption method is:
  986. %
  987. % char *MagickGetOption(MagickWand *wand,const char *key)
  988. %
  989. % A description of each parameter follows:
  990. %
  991. % o wand: the magick wand.
  992. %
  993. % o key: the key.
  994. %
  995. */
  996. WandExport char *MagickGetOption(MagickWand *wand,const char *key)
  997. {
  998. const char
  999. *option;
  1000. assert(wand != (MagickWand *) NULL);
  1001. assert(wand->signature == MagickWandSignature);
  1002. if (wand->debug != MagickFalse)
  1003. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  1004. option=GetImageOption(wand->image_info,key);
  1005. return(ConstantString(option));
  1006. }
  1007. /*
  1008. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1009. % %
  1010. % %
  1011. % %
  1012. % M a g i c k G e t O p t i o n s %
  1013. % %
  1014. % %
  1015. % %
  1016. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1017. %
  1018. % MagickGetOptions() returns all the option names that match the specified
  1019. % pattern associated with a wand. Use MagickGetOption() to return the value
  1020. % of a particular option. Use MagickRelinquishMemory() to free the value
  1021. % when you are finished with it.
  1022. %
  1023. % The format of the MagickGetOptions method is:
  1024. %
  1025. % char *MagickGetOptions(MagickWand *wand,const char *pattern,
  1026. % size_t *number_options)
  1027. %
  1028. % A description of each parameter follows:
  1029. %
  1030. % o wand: the magick wand.
  1031. %
  1032. % o pattern: Specifies a pointer to a text string containing a pattern.
  1033. %
  1034. % o number_options: the number options associated with this wand.
  1035. %
  1036. */
  1037. WandExport char **MagickGetOptions(MagickWand *wand,const char *pattern,
  1038. size_t *number_options)
  1039. {
  1040. char
  1041. **options;
  1042. const char
  1043. *option;
  1044. register ssize_t
  1045. i;
  1046. size_t
  1047. length;
  1048. assert(wand != (MagickWand *) NULL);
  1049. assert(wand->signature == MagickWandSignature);
  1050. if (wand->debug != MagickFalse)
  1051. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  1052. if (wand->images == (Image *) NULL)
  1053. {
  1054. (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
  1055. "ContainsNoImages","`%s'",wand->name);
  1056. return((char **) NULL);
  1057. }
  1058. length=1024;
  1059. options=(char **) AcquireQuantumMemory(length,sizeof(*options));
  1060. if (options == (char **) NULL)
  1061. return((char **) NULL);
  1062. ResetImageOptionIterator(wand->image_info);
  1063. option=GetNextImageOption(wand->image_info);
  1064. for (i=0; option != (const char *) NULL; )
  1065. {
  1066. if ((*option != '[') &&
  1067. (GlobExpression(option,pattern,MagickFalse) != MagickFalse))
  1068. {
  1069. if ((i+1) >= (ssize_t) length)
  1070. {
  1071. length<<=1;
  1072. options=(char **) ResizeQuantumMemory(options,length,
  1073. sizeof(*options));
  1074. if (options == (char **) NULL)
  1075. {
  1076. (void) ThrowMagickException(wand->exception,GetMagickModule(),
  1077. ResourceLimitError,"MemoryAllocationFailed","`%s'",
  1078. wand->name);
  1079. return((char **) NULL);
  1080. }
  1081. }
  1082. options[i]=ConstantString(option);
  1083. i++;
  1084. }
  1085. option=GetNextImageOption(wand->image_info);
  1086. }
  1087. options[i]=(char *) NULL;
  1088. *number_options=(size_t) i;
  1089. return(options);
  1090. }
  1091. /*
  1092. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1093. % %
  1094. % %
  1095. % %
  1096. % M a g i c k G e t O r i e n t a t i o n %
  1097. % %
  1098. % %
  1099. % %
  1100. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1101. %
  1102. % MagickGetOrientation() gets the wand orientation type.
  1103. %
  1104. % The format of the MagickGetOrientation method is:
  1105. %
  1106. % OrientationType MagickGetOrientation(MagickWand *wand)
  1107. %
  1108. % A description of each parameter follows:
  1109. %
  1110. % o wand: the magick wand.
  1111. %
  1112. */
  1113. WandExport OrientationType MagickGetOrientation(MagickWand *wand)
  1114. {
  1115. assert(wand != (MagickWand *) NULL);
  1116. assert(wand->signature == MagickWandSignature);
  1117. if (wand->debug != MagickFalse)
  1118. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  1119. return(wand->image_info->orientation);
  1120. }
  1121. /*
  1122. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1123. % %
  1124. % %
  1125. % %
  1126. % M a g i c k G e t P a c k a g e N a m e %
  1127. % %
  1128. % %
  1129. % %
  1130. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1131. %
  1132. % MagickGetPackageName() returns the ImageMagick package name as a string
  1133. % constant.
  1134. %
  1135. % The format of the MagickGetPackageName method is:
  1136. %
  1137. % const char *MagickGetPackageName(void)
  1138. %
  1139. %
  1140. */
  1141. WandExport const char *MagickGetPackageName(void)
  1142. {
  1143. return(GetMagickPackageName());
  1144. }
  1145. /*
  1146. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1147. % %
  1148. % %
  1149. % %
  1150. % M a g i c k G e t P a g e %
  1151. % %
  1152. % %
  1153. % %
  1154. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1155. %
  1156. % MagickGetPage() returns the page geometry associated with the magick wand.
  1157. %
  1158. % The format of the MagickGetPage method is:
  1159. %
  1160. % MagickBooleanType MagickGetPage(const MagickWand *wand,
  1161. % size_t *width,size_t *height,ssize_t *x,ssize_t *y)
  1162. %
  1163. % A description of each parameter follows:
  1164. %
  1165. % o wand: the magick wand.
  1166. %
  1167. % o width: the page width.
  1168. %
  1169. % o height: page height.
  1170. %
  1171. % o x: the page x-offset.
  1172. %
  1173. % o y: the page y-offset.
  1174. %
  1175. */
  1176. WandExport MagickBooleanType MagickGetPage(const MagickWand *wand,
  1177. size_t *width,size_t *height,ssize_t *x,ssize_t *y)
  1178. {
  1179. RectangleInfo
  1180. geometry;
  1181. assert(wand != (const MagickWand *) NULL);
  1182. assert(wand->signature == MagickWandSignature);
  1183. if (wand->debug != MagickFalse)
  1184. (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
  1185. (void) memset(&geometry,0,sizeof(geometry));
  1186. (void) ParseAbsoluteGeometry(wand->image_info->page,&geometry);
  1187. *width=geometry.width;
  1188. *height=geometry.height;
  1189. *x=geometry.x;
  1190. *y=geometry.y;
  1191. return(MagickTrue);
  1192. }
  1193. /*
  1194. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1195. % %
  1196. % %
  1197. % %
  1198. % M a g i c k G e t P o i n t s i z e %
  1199. % %
  1200. % %
  1201. % %
  1202. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1203. %
  1204. % MagickGetPointsize() returns the font pointsize associated with the
  1205. % MagickWand.
  1206. %
  1207. % The format of the MagickGetPointsize method is:
  1208. %
  1209. % double MagickGetPointsize(MagickWand *wand)
  1210. %
  1211. % A description of each parameter follows:
  1212. %
  1213. % o wand: the magick wand.
  1214. %
  1215. */
  1216. WandExport double MagickGetPointsize(MagickWand *wan

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