forked from Imagick/imagick
-
Notifications
You must be signed in to change notification settings - Fork 0
/
php_imagick_defs.h
1258 lines (1138 loc) Β· 39 KB
/
php_imagick_defs.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
+----------------------------------------------------------------------+
| PHP Version 5 / Imagick |
+----------------------------------------------------------------------+
| Copyright (c) 2006-2013 Mikko Koppanen, Scott MacVicar |
| ImageMagick (c) ImageMagick Studio LLC |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| [email protected] so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Mikko Kopppanen <[email protected]> |
| Scott MacVicar <[email protected]> |
+----------------------------------------------------------------------+
*/
#ifndef PHP_IMAGICK_DEFS_H /* PHP_IMAGICK_DEFS_H */
# define PHP_IMAGICK_DEFS_H
/* Include magic wand header */
#if defined (IM_MAGICKWAND_HEADER_STYLE_SEVEN)
# include <MagickWand/MagickWand.h>
#elif defined (IM_MAGICKWAND_HEADER_STYLE_OLD)
# include <wand/magick-wand.h>
#else
# include <wand/MagickWand.h>
#endif
#include "php_imagemagick_version_defs.h"
#if MagickLibVersion >= 0x700
#include "shim_im6_to_im7.h"
#endif
/* Some extra headers */
#include "Zend/zend_exceptions.h"
#include "Zend/zend_interfaces.h"
#include "ext/standard/php_string.h"
#include "ext/standard/info.h"
#include "ext/standard/php_filestat.h"
#include "php_ini.h"
#include "Zend/zend.h"
#if PHP_VERSION_ID >= 80000
#define HAVE_LOCALE_H
#define TSRMLS_C
#define TSRMLS_CC
#define TSRMLS_D
#define TSRMLS_DC
#define TSRMLS_FETCH()
#define TSRMLS_SET_CTX(ctx)
#endif
/* Include locale header */
#ifdef HAVE_LOCALE_H
# include <locale.h>
#endif
#if MagickLibVersion >= 0x680
#define IMAGICK_WITH_KERNEL
#endif
#if MagickLibVersion >= 0x700
#if !defined(MaxTextExtent)
# define MaxTextExtent 4096 /* always >= 4096 */
#endif
#endif
#if PHP_VERSION_ID >= 70000
#define im_long zend_long
#else
#define im_long long
#endif
#if PHP_VERSION_ID >= 70200
#define im_ce_countable zend_ce_countable
#else
#define im_ce_countable spl_ce_Countable
#endif
typedef struct _php_imagick_callback {
void ***thread_ctx;
#if PHP_VERSION_ID >= 70000
zval user_callback;
#else
zval *user_callback;
#endif
struct _php_imagick_callback *previous_callback;
} php_imagick_callback;
/* Globals, needed for the ini settings */
ZEND_BEGIN_MODULE_GLOBALS(imagick)
zend_bool locale_fix;
zend_bool progress_monitor;
zend_bool skip_version_check;
zend_bool set_single_thread;
zend_bool allow_zero_dimension_images;
im_long shutdown_sleep_count;
php_imagick_callback *progress_callback;
#ifdef PHP_IMAGICK_ZEND_MM
MagickWand *keep_alive;
#endif
ZEND_END_MODULE_GLOBALS(imagick)
#ifdef ZTS
# define IMAGICK_G(v) TSRMG(imagick_globals_id, zend_imagick_globals *, v)
#else
# define IMAGICK_G(v) (imagick_globals.v)
#endif
ZEND_EXTERN_MODULE_GLOBALS(imagick)
#ifdef HAVE_LOCALE_H
# if defined(PHP_WIN32)
# define IMAGICK_LC_NUMERIC_LOCALE "English"
# else
# define IMAGICK_LC_NUMERIC_LOCALE "C"
# endif
#endif
#if PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 3
#define zend_parse_parameters_none() zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "")
#endif
/* Class names */
#define PHP_IMAGICK_SC_NAME "Imagick"
#define PHP_IMAGICK_EXCEPTION_SC_NAME "ImagickException"
#define PHP_IMAGICKDRAW_SC_NAME "ImagickDraw"
#define PHP_IMAGICKDRAW_EXCEPTION_SC_NAME "ImagickDrawException"
#define PHP_IMAGICKPIXEL_SC_NAME "ImagickPixel"
#define PHP_IMAGICKPIXEL_EXCEPTION_SC_NAME "ImagickPixelException"
#define PHP_IMAGICKPIXELITERATOR_SC_NAME "ImagickPixelIterator"
#define PHP_IMAGICKPIXELITERATOR_EXCEPTION_SC_NAME "ImagickPixelIteratorException"
#ifdef IMAGICK_WITH_KERNEL
#define PHP_IMAGICKKERNEL_SC_NAME "ImagickKernel"
#define PHP_IMAGICKKERNEL_EXCEPTION_SC_NAME "ImagickKernelException"
#endif
#if PHP_VERSION_ID >= 70000
/* Structure for Imagick object. */
typedef struct _php_imagick_object {
MagickWand *magick_wand;
char *progress_monitor_name;
zend_bool next_out_of_bound;
zend_object zo;
} php_imagick_object;
#else
/* Structure for Imagick object. */
typedef struct _php_imagick_object {
zend_object zo;
MagickWand *magick_wand;
char *progress_monitor_name;
zend_bool next_out_of_bound;
} php_imagick_object;
#endif
#if PHP_VERSION_ID >= 70000
/* Structure for ImagickDraw object. */
typedef struct _php_imagickdraw_object {
DrawingWand *drawing_wand;
zend_object zo;
} php_imagickdraw_object;
#else
/* Structure for ImagickDraw object. */
typedef struct _php_imagickdraw_object {
zend_object zo;
DrawingWand *drawing_wand;
} php_imagickdraw_object;
#endif
#if PHP_VERSION_ID >= 70000
/* Structure for ImagickPixelIterator object. */
typedef struct _php_imagickpixeliterator_object {
PixelIterator *pixel_iterator;
zend_bool initialized;
#if MagickLibVersion <= 0x628
long rows;
long iterator_position;
#endif
zend_object zo;
} php_imagickpixeliterator_object;
#else
/* Structure for ImagickPixelIterator object. */
typedef struct _php_imagickpixeliterator_object {
zend_object zo;
PixelIterator *pixel_iterator;
zend_bool initialized;
#if MagickLibVersion <= 0x628
long rows;
long iterator_position;
#endif
} php_imagickpixeliterator_object;
#endif
#if PHP_VERSION_ID >= 70000
/* Structure for ImagickPixel object. */
typedef struct _php_imagickpixel_object {
PixelWand *pixel_wand;
zend_bool initialized_via_iterator;
zend_object zo;
} php_imagickpixel_object;
#else
/* Structure for ImagickPixel object. */
typedef struct _php_imagickpixel_object {
zend_object zo;
PixelWand *pixel_wand;
zend_bool initialized_via_iterator;
} php_imagickpixel_object;
#endif
#ifdef IMAGICK_WITH_KERNEL
#if PHP_VERSION_ID >= 70000
/* Structure for ImagickKernel object. */
typedef struct _php_imagickkernel_object {
KernelInfo *kernel_info;
zend_object zo;
} php_imagickkernel_object;
#else
/* Structure for ImagickKernel object. */
typedef struct _php_imagickkernel_object {
zend_object zo;
KernelInfo *kernel_info;
} php_imagickkernel_object;
#endif
#endif
//Object fetching.
#if PHP_VERSION_ID >= 70000
static inline php_imagick_object *php_imagick_fetch_object(zend_object *obj) {
return (php_imagick_object *)((char*)(obj) - XtOffsetOf(php_imagick_object, zo));
}
static inline php_imagickdraw_object *php_imagickdraw_fetch_object(zend_object *obj) {
return (php_imagickdraw_object *)((char*)(obj) - XtOffsetOf(php_imagickdraw_object, zo));
}
static inline php_imagickpixel_object *php_imagickpixel_fetch_object(zend_object *obj) {
return (php_imagickpixel_object *)((char*)(obj) - XtOffsetOf(php_imagickpixel_object, zo));
}
static inline php_imagickpixeliterator_object *php_imagickpixeliterator_fetch_object(zend_object *obj) {
return (php_imagickpixeliterator_object *)((char*)(obj) - XtOffsetOf(php_imagickpixeliterator_object, zo));
}
#ifdef IMAGICK_WITH_KERNEL
static inline php_imagickkernel_object *php_imagickkernel_fetch_object(zend_object *obj) {
return (php_imagickkernel_object *)((char*)(obj) - XtOffsetOf(php_imagickkernel_object, zo));
}
#endif
#else
#define php_imagick_fetch_object(object) ((php_imagick_object *)object)
#define php_imagickdraw_fetch_object(object) ((php_imagickdraw_object *)object)
#define php_imagickpixel_fetch_object(object) ((php_imagickpixel_object *)object)
#define php_imagickpixeliterator_fetch_object(object) ((php_imagickpixeliterator_object *)object)
#define php_imagickkernel_fetch_object(object) ((php_imagickkernel_object *)object)
#endif
// Object access
#if PHP_VERSION_ID >= 70000
#define Z_IMAGICK_P(zv) php_imagick_fetch_object(Z_OBJ_P((zv)))
#define Z_IMAGICKDRAW_P(zv) php_imagickdraw_fetch_object(Z_OBJ_P((zv)))
#define Z_IMAGICKPIXEL_P(zv) php_imagickpixel_fetch_object(Z_OBJ_P((zv)))
#define Z_IMAGICKPIXELITERATOR_P(zv) php_imagickpixeliterator_fetch_object(Z_OBJ_P((zv)))
#ifdef IMAGICK_WITH_KERNEL
#define Z_IMAGICKKERNEL_P(zv) php_imagickkernel_fetch_object(Z_OBJ_P((zv)))
#endif
#else
#define Z_IMAGICK_P(zv) (php_imagick_object *)zend_object_store_get_object(zv TSRMLS_CC)
#define Z_IMAGICKDRAW_P(zv) (php_imagickdraw_object *)zend_object_store_get_object(zv TSRMLS_CC)
#define Z_IMAGICKPIXEL_P(zv) (php_imagickpixel_object *) zend_object_store_get_object(zv TSRMLS_CC)
#define Z_IMAGICKPIXELITERATOR_P(zv) (php_imagickpixeliterator_object *)zend_object_store_get_object(zv TSRMLS_CC)
#define Z_IMAGICKKERNEL_P(zv) (php_imagickkernel_object *)zend_object_store_get_object(zv TSRMLS_CC)
#endif
// String access
#if PHP_VERSION_ID >= 70000
#define IM_ZVAL_STRING(zv, charstar) ZVAL_STRING(zv, charstar);
#define IM_RETURN_STRING(s) RETURN_STRING(s)
#else
#define IM_ZVAL_STRING(zv, charstar) ZVAL_STRING(zv, charstar, 1);
//RETURN_STRING(s, duplicate)
#define IM_RETURN_STRING(s) RETURN_STRING(s, 0)
#endif
#if PHP_VERSION_ID >= 70000
#define IM_add_assoc_string(zv, key, charstr) add_assoc_string(zv, key, charstr)
#define IM_ZVAL_STRINGL(zv, charstr, length) ZVAL_STRINGL(zv, charstr, length)
#define IM_add_next_index_string(zv, charstr) add_next_index_string(zv, charstr)
#define IM_LEN_TYPE size_t
#else
#define IM_add_assoc_string(zv, key, charstr) add_assoc_string(zv, key, charstr, 1)
#define IM_add_assoc_string(zv, key, charstr) add_assoc_string(zv, key, charstr, 1)
#define IM_ZVAL_STRINGL(zv, charstr, length) ZVAL_STRINGL(zv, charstr, length, 1)
#define IM_add_next_index_string(zv, charstr) add_next_index_string(zv, charstr, 1)
#define IM_add_next_index_zval(zv1, zv2)
#define IM_LEN_TYPE int
#endif
#if PHP_VERSION_ID >= 70000
#define IM_ZEND_OBJECT zend_object
#else
#define IM_ZEND_OBJECT void
#endif
/* RETURN_THROWS() isn't defined in PHP 5.6 through 7.4
*/
#if !defined(RETURN_THROWS)
#define RETURN_THROWS() return
#endif
/* Define some color constants */
typedef enum _php_imagick_color_t {
PHP_IMAGICK_COLOR_MIN = 10,
PHP_IMAGICK_COLOR_BLACK,
PHP_IMAGICK_COLOR_BLUE,
PHP_IMAGICK_COLOR_CYAN,
PHP_IMAGICK_COLOR_GREEN,
PHP_IMAGICK_COLOR_RED,
PHP_IMAGICK_COLOR_YELLOW,
PHP_IMAGICK_COLOR_MAGENTA,
#if MagickLibVersion < 0x700
PHP_IMAGICK_COLOR_OPACITY,
#endif
PHP_IMAGICK_COLOR_ALPHA,
PHP_IMAGICK_COLOR_FUZZ,
PHP_IMAGICK_COLOR_MAX,
} php_imagick_color_t;
/* Class enum */
typedef enum _php_imagick_class_type_t {
IMAGICK_CLASS,
IMAGICKDRAW_CLASS,
IMAGICKPIXELITERATOR_CLASS,
IMAGICKPIXEL_CLASS,
#ifdef IMAGICK_WITH_KERNEL
IMAGICKKERNEL_CLASS
#endif
} php_imagick_class_type_t;
/* Read / write constants */
typedef enum _php_imagick_rw_result_t {
IMAGICK_RW_OK,
IMAGICK_RW_SAFE_MODE_ERROR,
IMAGICK_RW_OPEN_BASEDIR_ERROR,
IMAGICK_RW_UNDERLYING_LIBRARY,
IMAGICK_RW_PERMISSION_DENIED,
IMAGICK_RW_FILENAME_TOO_LONG,
IMAGICK_RW_PATH_DOES_NOT_EXIST,
IMAGICK_RW_PATH_IS_DIR,
} php_imagick_rw_result_t;
/* Class entries */
extern zend_class_entry *php_imagick_sc_entry;
extern zend_class_entry *php_imagick_exception_class_entry;
extern zend_class_entry *php_imagickdraw_sc_entry;
extern zend_class_entry *php_imagickdraw_exception_class_entry;
extern zend_class_entry *php_imagickpixel_sc_entry;
extern zend_class_entry *php_imagickpixel_exception_class_entry;
extern zend_class_entry *php_imagickpixeliterator_sc_entry;
extern zend_class_entry *php_imagickpixeliterator_exception_class_entry;
#ifdef IMAGICK_WITH_KERNEL
extern zend_class_entry *php_imagickkernel_sc_entry;
extern zend_class_entry *php_imagickkernel_exception_class_entry;
#endif
/* Forward declarations (Imagick) */
#if (MagickLibVersion >= 0x700 && MagickLibVersion >= 0x709)
#define PHP_IMAGICK_HAVE_HOUGHLINE 1
#else
#define PHP_IMAGICK_HAVE_HOUGHLINE 0
#endif
/* The conditional methods */
#if MagickLibVersion > 0x628
PHP_METHOD(imagick, pingimageblob);
PHP_METHOD(imagick, pingimagefile);
PHP_METHOD(imagick, transposeimage);
PHP_METHOD(imagick, transverseimage);
PHP_METHOD(imagick, trimimage);
PHP_METHOD(imagick, waveimage);
PHP_METHOD(imagick, vignetteimage);
PHP_METHOD(imagick, compareimagelayers);
PHP_METHOD(imagick, optimizeimagelayers);
PHP_METHOD(imagick, uniqueimagecolors);
#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
#if MagickLibVersion < 0x700
PHP_METHOD(imagick, getimagematte);
#endif //#if MagickLibVersion < 0x700
#endif
PHP_METHOD(imagick, setimagematte);
PHP_METHOD(imagick, adaptiveresizeimage);
PHP_METHOD(imagick, sketchimage);
PHP_METHOD(imagick, shadeimage);
PHP_METHOD(imagick, getsizeoffset);
PHP_METHOD(imagick, setsizeoffset);
PHP_METHOD(imagick, adaptiveblurimage);
PHP_METHOD(imagick, contraststretchimage);
PHP_METHOD(imagick, adaptivesharpenimage);
PHP_METHOD(imagick, randomthresholdimage);
PHP_METHOD(imagick, roundcornersimage);
PHP_METHOD(imagick, setiteratorindex);
PHP_METHOD(imagick, getiteratorindex);
#if MagickLibVersion < 0x700
PHP_METHOD(imagick, transformimage);
#endif // #if MagickLibVersion < 0x700
#endif
#if MagickLibVersion > 0x630
#if MagickLibVersion < 0x700
PHP_METHOD(imagick, setimageopacity);
#endif
#if MagickLibVersion >= 0x700
PHP_METHOD(imagick, setimagealpha);
#endif
#if MagickLibVersion < 0x700
PHP_METHOD(imagick, orderedposterizeimage);
#endif //#if MagickLibVersion < 0x700
#endif
#if MagickLibVersion > 0x631
PHP_METHOD(imagick, polaroidimage);
PHP_METHOD(imagick, getimageproperty);
PHP_METHOD(imagick, setimageproperty);
PHP_METHOD(imagick, deleteimageproperty);
PHP_METHOD(imagick, identifyformat);
#if IM_HAVE_IMAGICK_SETIMAGEINTERPOLATEMETHOD
PHP_METHOD(imagick, setimageinterpolatemethod);
#endif
PHP_METHOD(imagick, getimageinterpolatemethod);
PHP_METHOD(imagick, linearstretchimage);
PHP_METHOD(imagick, getimagelength);
PHP_METHOD(imagick, extentimage);
#endif
#if MagickLibVersion > 0x633
PHP_METHOD(imagick, getimageorientation);
PHP_METHOD(imagick, setimageorientation);
#endif
#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
#if MagickLibVersion > 0x634
PHP_METHOD(imagick, paintfloodfillimage);
#endif
#endif
#if MagickLibVersion > 0x635
PHP_METHOD(imagick, clutimage);
PHP_METHOD(imagick, getimageproperties);
PHP_METHOD(imagick, getimageprofiles);
PHP_METHOD(imagick, distortimage);
PHP_METHOD(imagick, writeimagefile);
PHP_METHOD(imagick, writeimagesfile);
PHP_METHOD(imagick, resetimagepage);
#if MagickLibVersion < 0x700
PHP_METHOD(imagick, setimageclipmask);
PHP_METHOD(imagick, getimageclipmask);
#endif
PHP_METHOD(imagick, animateimages);
#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
#if MagickLibVersion < 0x700
PHP_METHOD(imagick, recolorimage);
#endif
#endif
#endif
#if MagickLibVersion > 0x636
PHP_METHOD(imagick, setfont);
PHP_METHOD(imagick, getfont);
PHP_METHOD(imagick, setpointsize);
PHP_METHOD(imagick, getpointsize);
PHP_METHOD(imagick, mergeimagelayers);
#endif
#if MagickLibVersion > 0x637
PHP_METHOD(imagick, floodfillpaintimage);
PHP_METHOD(imagick, opaquepaintimage);
PHP_METHOD(imagick, transparentpaintimage);
PHP_METHOD(imagick, setimagealphachannel);
#endif
#if MagickLibVersion > 0x638
PHP_METHOD(imagick, liquidrescaleimage);
PHP_METHOD(imagick, decipherimage);
PHP_METHOD(imagick, encipherimage);
#endif
#if MagickLibVersion > 0x639
PHP_METHOD(imagick, setgravity);
PHP_METHOD(imagick, getgravity);
PHP_METHOD(imagick, getimagechannelrange);
PHP_METHOD(imagick, getimagealphachannel);
#endif
#if MagickLibVersion > 0x642
PHP_METHOD(imagick, getimagechanneldistortions);
#endif
#if MagickLibVersion > 0x643
PHP_METHOD(imagick, getimagegravity);
PHP_METHOD(imagick, setimagegravity);
#endif
#if MagickLibVersion > 0x645
PHP_METHOD(imagick, importimagepixels);
PHP_METHOD(imagick, deskewimage);
#if PHP_IMAGICK_HAVE_HOUGHLINE
PHP_METHOD(imagick, houghlineimage);
#endif
PHP_METHOD(imagick, segmentimage);
PHP_METHOD(imagick, sparsecolorimage);
PHP_METHOD(imagick, remapimage);
#endif
#if MagickLibVersion > 0x646
PHP_METHOD(imagick, exportimagepixels);
#endif
#if MagickLibVersion > 0x648
PHP_METHOD(imagick, getimagechannelkurtosis);
PHP_METHOD(imagick, functionimage);
#endif
#if MagickLibVersion > 0x651
PHP_METHOD(imagick, transformimagecolorspace);
#endif
#if MagickLibVersion > 0x652
PHP_METHOD(imagick, haldclutimage);
#endif
#if MagickLibVersion > 0x655
PHP_METHOD(imagick, autolevelimage);
PHP_METHOD(imagick, blueshiftimage);
#endif
#if MagickLibVersion > 0x656
PHP_METHOD(imagick, setimageartifact);
PHP_METHOD(imagick, getimageartifact);
PHP_METHOD(imagick, deleteimageartifact);
PHP_METHOD(imagick, setcolorspace);
PHP_METHOD(imagick, getcolorspace);
PHP_METHOD(imagick, clampimage);
#endif
#if MagickLibVersion > 0x667
PHP_METHOD(imagick, smushimages);
#endif
PHP_METHOD(imagick, __construct);
PHP_METHOD(imagick, __tostring);
PHP_METHOD(imagick, count);
PHP_METHOD(imagick, getpixeliterator);
PHP_METHOD(imagick, getpixelregioniterator);
PHP_METHOD(imagick, readimage);
PHP_METHOD(imagick, readimages);
PHP_METHOD(imagick, pingimage);
PHP_METHOD(imagick, readimageblob);
PHP_METHOD(imagick, readimagefile);
PHP_METHOD(imagick, displayimage);
PHP_METHOD(imagick, displayimages);
PHP_METHOD(imagick, destroy);
PHP_METHOD(imagick, clear);
PHP_METHOD(imagick, clone);
PHP_METHOD(imagick, removeimage);
PHP_METHOD(imagick, writeimage);
PHP_METHOD(imagick, writeimages);
PHP_METHOD(imagick, resetiterator);
PHP_METHOD(imagick, setfirstiterator);
PHP_METHOD(imagick, setlastiterator);
PHP_METHOD(imagick, previousimage);
PHP_METHOD(imagick, nextimage);
PHP_METHOD(imagick, haspreviousimage);
PHP_METHOD(imagick, hasnextimage);
#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
#if MagickLibVersion < 0x700
PHP_METHOD(imagick, setimageindex);
PHP_METHOD(imagick, getimageindex);
#endif // #if MagickLibVersion < 0x700
#endif
PHP_METHOD(imagick, setimageformat);
PHP_METHOD(imagick, setimagefilename);
PHP_METHOD(imagick, getimagefilename);
PHP_METHOD(imagick, getimageformat);
PHP_METHOD(imagick, getimagemimetype);
#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
#if MagickLibVersion < 0x700
PHP_METHOD(imagick, getimagesize);
#endif
#endif
PHP_METHOD(imagick, getimagegeometry);
PHP_METHOD(imagick, getimagecolors);
PHP_METHOD(imagick, scaleimage);
PHP_METHOD(imagick, blurimage);
PHP_METHOD(imagick, thumbnailimage);
PHP_METHOD(imagick, cropthumbnailimage);
PHP_METHOD(imagick, commentimage);
PHP_METHOD(imagick, cropimage);
PHP_METHOD(imagick, labelimage);
PHP_METHOD(imagick, valid);
PHP_METHOD(imagick, current);
PHP_METHOD(imagick, drawimage);
PHP_METHOD(imagick, getimageblob);
PHP_METHOD(imagick, getimagesblob);
PHP_METHOD(imagick, setimagecompressionquality);
PHP_METHOD(imagick, getimagecompressionquality);
PHP_METHOD(imagick, setimagecompression);
PHP_METHOD(imagick, getimagecompression);
PHP_METHOD(imagick, annotateimage);
PHP_METHOD(imagick, compositeimage);
PHP_METHOD(imagick, modulateimage);
PHP_METHOD(imagick, montageimage);
PHP_METHOD(imagick, morphology);
PHP_METHOD(imagick, identifyimage);
PHP_METHOD(imagick, thresholdimage);
PHP_METHOD(imagick, adaptivethresholdimage);
PHP_METHOD(imagick, blackthresholdimage);
PHP_METHOD(imagick, whitethresholdimage);
PHP_METHOD(imagick, appendimages);
PHP_METHOD(imagick, charcoalimage);
PHP_METHOD(imagick, normalizeimage);
PHP_METHOD(imagick, oilpaintimage);
PHP_METHOD(imagick, posterizeimage);
#if MagickLibVersion < 0x700
PHP_METHOD(imagick, radialblurimage);
#endif
PHP_METHOD(imagick, raiseimage);
PHP_METHOD(imagick, resampleimage);
PHP_METHOD(imagick, resizeimage);
PHP_METHOD(imagick, rollimage);
PHP_METHOD(imagick, rotateimage);
PHP_METHOD(imagick, sampleimage);
PHP_METHOD(imagick, solarizeimage);
PHP_METHOD(imagick, shadowimage);
#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
#if MagickLibVersion < 0x700
PHP_METHOD(imagick, setimageattribute);
#endif // #if MagickLibVersion < 0x700
#endif
PHP_METHOD(imagick, setimagebackgroundcolor);
#if MagickLibVersion >= 0x700
PHP_METHOD(imagick, setimagechannelmask);
#endif
PHP_METHOD(imagick, setimagecompose);
PHP_METHOD(imagick, setimagecompression);
PHP_METHOD(imagick, setimagedelay);
PHP_METHOD(imagick, setimagedepth);
PHP_METHOD(imagick, setimagegamma);
PHP_METHOD(imagick, setimageiterations);
#if MagickLibVersion < 0x700
PHP_METHOD(imagick, setimagemattecolor);
#endif // #if MagickLibVersion < 0x700
PHP_METHOD(imagick, setimagepage);
PHP_METHOD(imagick, setimageprogressmonitor);
#if MagickLibVersion > 0x653
PHP_METHOD(imagick, setprogressmonitor);
#endif
PHP_METHOD(imagick, setimageresolution);
PHP_METHOD(imagick, setimagescene);
PHP_METHOD(imagick, setimagetickspersecond);
PHP_METHOD(imagick, setimagetype);
PHP_METHOD(imagick, setimageunits);
PHP_METHOD(imagick, sharpenimage);
PHP_METHOD(imagick, shaveimage);
PHP_METHOD(imagick, shearimage);
PHP_METHOD(imagick, spliceimage);
PHP_METHOD(imagick, spreadimage);
PHP_METHOD(imagick, swirlimage);
PHP_METHOD(imagick, stripimage);
PHP_METHOD(imagick, queryformats);
PHP_METHOD(imagick, queryfonts);
PHP_METHOD(imagick, queryfontmetrics);
PHP_METHOD(imagick, steganoimage);
PHP_METHOD(imagick, motionblurimage);
#if MagickLibVersion < 0x700
#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
PHP_METHOD(imagick, mosaicimages);
#endif
#endif
PHP_METHOD(imagick, morphimages);
PHP_METHOD(imagick, minifyimage);
PHP_METHOD(imagick, addnoiseimage);
PHP_METHOD(imagick, affinetransformimage);
#if MagickLibVersion < 0x700
#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
PHP_METHOD(imagick, averageimages);
#endif
#endif
PHP_METHOD(imagick, borderimage);
PHP_METHOD(imagick, calculatecrop);
PHP_METHOD(imagick, chopimage);
PHP_METHOD(imagick, clipimage);
PHP_METHOD(imagick, clippathimage);
PHP_METHOD(imagick, coalesceimages);
#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
#if MagickLibVersion < 0x700
PHP_METHOD(imagick, colorfloodfillimage);
#endif //#if MagickLibVersion < 0x700
#endif
PHP_METHOD(imagick, colorizeimage);
PHP_METHOD(imagick, compareimagechannels);
PHP_METHOD(imagick, compareimages);
PHP_METHOD(imagick, contrastimage);
PHP_METHOD(imagick, combineimages);
PHP_METHOD(imagick, convolveimage);
PHP_METHOD(imagick, cyclecolormapimage);
PHP_METHOD(imagick, deconstructimages);
PHP_METHOD(imagick, despeckleimage);
PHP_METHOD(imagick, edgeimage);
PHP_METHOD(imagick, embossimage);
PHP_METHOD(imagick, enhanceimage);
PHP_METHOD(imagick, equalizeimage);
PHP_METHOD(imagick, evaluateimage);
#if MagickLibVersion >= 0x687
PHP_METHOD(imagick, evaluateimages);
#endif
#if MagickLibVersion < 0x700
#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
PHP_METHOD(imagick, flattenimages);
#endif
#endif
PHP_METHOD(imagick, flipimage);
PHP_METHOD(imagick, flopimage);
#if MagickLibVersion >= 0x655
PHP_METHOD(imagick, forwardfouriertransformimage);
#endif
PHP_METHOD(imagick, frameimage);
PHP_METHOD(imagick, fximage);
PHP_METHOD(imagick, gammaimage);
PHP_METHOD(imagick, gaussianblurimage);
#if MagickLibVersion < 0x700
#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
PHP_METHOD(imagick, getimageattribute);
#endif
#endif
PHP_METHOD(imagick, getimagebackgroundcolor);
PHP_METHOD(imagick, getimageblueprimary);
PHP_METHOD(imagick, getimagebordercolor);
PHP_METHOD(imagick, getimagechanneldepth);
PHP_METHOD(imagick, getimagechanneldistortion);
#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
#if MagickLibVersion < 0x700
PHP_METHOD(imagick, getimagechannelextrema);
#endif // #if MagickLibVersion < 0x700
#endif
PHP_METHOD(imagick, getimagechannelmean);
PHP_METHOD(imagick, getimagechannelstatistics);
PHP_METHOD(imagick, getimagecolormapcolor);
PHP_METHOD(imagick, getimagecolorspace);
PHP_METHOD(imagick, getimagecompose);
PHP_METHOD(imagick, getimagedelay);
PHP_METHOD(imagick, getimagedepth);
PHP_METHOD(imagick, getimagedistortion);
#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
#if MagickLibVersion < 0x700
PHP_METHOD(imagick, getimageextrema);
#endif // #if MagickLibVersion < 0x700
#endif
PHP_METHOD(imagick, getimagedispose);
PHP_METHOD(imagick, getimagegamma);
PHP_METHOD(imagick, getimagegreenprimary);
PHP_METHOD(imagick, getimageheight);
PHP_METHOD(imagick, getimagehistogram);
PHP_METHOD(imagick, getimageinterlacescheme);
PHP_METHOD(imagick, getimageiterations);
#if MagickLibVersion < 0x700
PHP_METHOD(imagick, getimagemattecolor);
#endif //#if MagickLibVersion < 0x700
PHP_METHOD(imagick, getimagepage);
PHP_METHOD(imagick, getimagepixelcolor);
PHP_METHOD(imagick, setImagePixelColor);
PHP_METHOD(imagick, getimageprofile);
PHP_METHOD(imagick, getimageredprimary);
PHP_METHOD(imagick, getimagerenderingintent);
PHP_METHOD(imagick, getimageresolution);
PHP_METHOD(imagick, getimagescene);
PHP_METHOD(imagick, getimagesignature);
PHP_METHOD(imagick, getimagetickspersecond);
PHP_METHOD(imagick, getimagetype);
PHP_METHOD(imagick, getimageunits);
PHP_METHOD(imagick, getimagevirtualpixelmethod);
PHP_METHOD(imagick, getimagewhitepoint);
PHP_METHOD(imagick, getimagewidth);
PHP_METHOD(imagick, getnumberimages);
PHP_METHOD(imagick, getimagetotalinkdensity);
PHP_METHOD(imagick, getimageregion);
PHP_METHOD(imagick, implodeimage);
#if MagickLibVersion >= 0x658
PHP_METHOD(imagick, inversefouriertransformimage);
#endif
PHP_METHOD(imagick, levelimage);
PHP_METHOD(imagick, magnifyimage);
#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
#if MagickLibVersion < 0x700
PHP_METHOD(imagick, mapimage);
PHP_METHOD(imagick, mattefloodfillimage);
#endif // #if MagickLibVersion < 0x700
#endif
#if MagickLibVersion < 0x700
PHP_METHOD(imagick, medianfilterimage);
#endif
PHP_METHOD(imagick, negateimage);
#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
#if MagickLibVersion < 0x700
PHP_METHOD(imagick, paintopaqueimage);
PHP_METHOD(imagick, painttransparentimage);
#endif //#if MagickLibVersion < 0x700
#endif
PHP_METHOD(imagick, previewimages);
PHP_METHOD(imagick, profileimage);
PHP_METHOD(imagick, quantizeimage);
PHP_METHOD(imagick, quantizeimages);
#if MagickLibVersion < 0x700
PHP_METHOD(imagick, reducenoiseimage);
#endif
PHP_METHOD(imagick, removeimageprofile);
PHP_METHOD(imagick, separateimagechannel);
PHP_METHOD(imagick, sepiatoneimage);
#if MagickLibVersion < 0x700
PHP_METHOD(imagick, setimagebias);
PHP_METHOD(imagick, setimagebiasquantum);
#endif
PHP_METHOD(imagick, setimageblueprimary);
PHP_METHOD(imagick, setimagebordercolor);
PHP_METHOD(imagick, setimagechanneldepth);
PHP_METHOD(imagick, setimagecolormapcolor);
PHP_METHOD(imagick, setimagecolorspace);
PHP_METHOD(imagick, setimagedispose);
PHP_METHOD(imagick, setimageextent);
PHP_METHOD(imagick, setimagegreenprimary);
PHP_METHOD(imagick, setimageinterlacescheme);
PHP_METHOD(imagick, setimageprofile);
PHP_METHOD(imagick, setimageredprimary);
PHP_METHOD(imagick, setimagerenderingintent);
PHP_METHOD(imagick, setimagevirtualpixelmethod);
PHP_METHOD(imagick, setimagewhitepoint);
PHP_METHOD(imagick, sigmoidalcontrastimage);
PHP_METHOD(imagick, stereoimage);
PHP_METHOD(imagick, textureimage);
PHP_METHOD(imagick, tintimage);
PHP_METHOD(imagick, unsharpmaskimage);
PHP_METHOD(imagick, getimage);
PHP_METHOD(imagick, setimage);
PHP_METHOD(imagick, addimage);
PHP_METHOD(imagick, newimage);
PHP_METHOD(imagick, newpseudoimage);
PHP_METHOD(imagick, getcompression);
PHP_METHOD(imagick, getcompressionquality);
PHP_METHOD(imagick, getcopyright);
PHP_METHOD(imagick, getconfigureoptions);
#if MagickLibVersion > 0x660
PHP_METHOD(imagick, getfeatures);
#endif
PHP_METHOD(imagick, getfilename);
PHP_METHOD(imagick, getformat);
PHP_METHOD(imagick, gethomeurl);
PHP_METHOD(imagick, getinterlacescheme);
PHP_METHOD(imagick, getoption);
PHP_METHOD(imagick, getpackagename);
PHP_METHOD(imagick, getpage);
PHP_METHOD(imagick, gethdrienabled);
PHP_METHOD(imagick, getquantum);
PHP_METHOD(imagick, getquantumdepth);
PHP_METHOD(imagick, getquantumrange);
PHP_METHOD(imagick, getreleasedate);
PHP_METHOD(imagick, getresource);
PHP_METHOD(imagick, getresourcelimit);
PHP_METHOD(imagick, getsamplingfactors);
PHP_METHOD(imagick, getsize);
PHP_METHOD(imagick, getversion);
PHP_METHOD(imagick, setbackgroundcolor);
PHP_METHOD(imagick, setcompression);
PHP_METHOD(imagick, setcompressionquality);
PHP_METHOD(imagick, setfilename);
PHP_METHOD(imagick, setformat);
PHP_METHOD(imagick, setinterlacescheme);
PHP_METHOD(imagick, setoption);
PHP_METHOD(imagick, setpage);
PHP_METHOD(imagick, setresourcelimit);
PHP_METHOD(imagick, setresolution);
PHP_METHOD(imagick, setsamplingfactors);
PHP_METHOD(imagick, setsize);
PHP_METHOD(imagick, settype);
PHP_METHOD(imagick, brightnesscontrastimage);
#if MagickLibVersion > 0x661
PHP_METHOD(imagick, colormatriximage);
#endif
PHP_METHOD(imagick, selectiveblurimage);
#if MagickLibVersion >= 0x689
PHP_METHOD(imagick, rotationalblurimage);
#endif
#if MagickLibVersion >= 0x687
PHP_METHOD(imagick, optimizeimagetransparency);
#endif
#if MagickLibVersion >= 0x683
PHP_METHOD(imagick, statisticimage);
#endif
#if MagickLibVersion >= 0x652
PHP_METHOD(imagick, subimagematch);
#endif
PHP_METHOD(imagick, setregistry);
PHP_METHOD(imagick, getregistry);
PHP_METHOD(imagick, listregistry);
PHP_METHOD(imagick, morphology);
#if MagickLibVersion < 0x700
PHP_METHOD(imagick, filter);
#endif // #if MagickLibVersion < 0x700
PHP_METHOD(imagick, setantialias);
PHP_METHOD(imagick, getantialias);
#if MagickLibVersion > 0x676
PHP_METHOD(imagick, colordecisionlistimage);
#endif
#if MagickLibVersion >= 0x660
PHP_METHOD(imagick, autogammaimage);
#endif //#if MagickLibVersion >= 0x660
#if MagickLibVersion >= 0x692
PHP_METHOD(imagick, autoorient);
PHP_METHOD(imagick, compositeimagegravity);
#endif // #if MagickLibVersion >= 0x692
#if MagickLibVersion >= 0x692
PHP_METHOD(imagick, localcontrastimage);
#endif // #if MagickLibVersion >= 0x692
#if MagickLibVersion >= 0x700
PHP_METHOD(imagick, identifyimagetype);
#endif // #if MagickLibVersion >= 0x700
#if IM_HAVE_IMAGICK_SETSEED
PHP_METHOD(imagick, setSeed);
#endif
#if IM_HAVE_IMAGICK_WAVELETDENOISEIMAGE
PHP_METHOD(imagick, waveletDenoiseImage);
#endif
#if IM_HAVE_IMAGICK_MEANSHIFTIMAGE
PHP_METHOD(imagick, meanShiftImage);
#endif
#if IM_HAVE_IMAGICK_KMEANSIMAGE
PHP_METHOD(imagick, kmeansImage);
#endif
#if IM_HAVE_IMAGICK_RANGETHRESHOLDIMAGE
PHP_METHOD(imagick, rangeThresholdImage);
#endif
#if IM_HAVE_IMAGICK_AUTOTHRESHOLDIMAGE
PHP_METHOD(imagick, autoThresholdImage);
#endif
#if IM_HAVE_IMAGICK_BILATERALBLURIMAGE
PHP_METHOD(imagick, bilateralBlurImage);
#endif
#if IM_HAVE_IMAGICK_CLAHEIMAGE
PHP_METHOD(imagick, claheImage);
#endif
#if IM_HAVE_IMAGICK_CHANNELFXIMAGE
PHP_METHOD(imagick, channelFxImage);
#endif
#if IM_HAVE_IMAGICK_COLORTHRESHOLDIMAGE
PHP_METHOD(imagick, colorThresholdImage);
#endif
#if IM_HAVE_IMAGICK_COMPLEXIMAGES
PHP_METHOD(imagick, complexImages);
#endif
#if IM_HAVE_IMAGICK_INTERPOLATIVERESIZEIMAGE
PHP_METHOD(imagick, interpolativeResizeImage);