-
Notifications
You must be signed in to change notification settings - Fork 8
/
gd.php
2521 lines (2350 loc) · 77.1 KB
/
gd.php
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
// Start of gd v.7.0.4-7ubuntu2
/**
* (PHP 4 >= 4.3.0, PHP 5, PHP 7)<br/>
* Retrieve information about the currently installed GD library
* @link http://php.net/manual/en/function.gd-info.php
* @return array an associative array.
* </p>
* <p>
* <table>
* Elements of array returned by <b>gd_info</b>
* <tr valign="top">
* <td>Attribute</td>
* <td>Meaning</td>
* </tr>
* <tr valign="top">
* <td>GD Version</td>
* <td>string value describing the installed
* libgd version.</td>
* </tr>
* <tr valign="top">
* <td>FreeType Support</td>
* <td>boolean value. <b>TRUE</b>
* if FreeType Support is installed.</td>
* </tr>
* <tr valign="top">
* <td>FreeType Linkage</td>
* <td>string value describing the way in which
* FreeType was linked. Expected values are: 'with freetype',
* 'with TTF library', and 'with unknown library'. This element will
* only be defined if FreeType Support evaluated to
* <b>TRUE</b>.</td>
* </tr>
* <tr valign="top">
* <td>T1Lib Support</td>
* <td>boolean value. <b>TRUE</b>
* if T1Lib support is included.</td>
* </tr>
* <tr valign="top">
* <td>GIF Read Support</td>
* <td>boolean value. <b>TRUE</b>
* if support for reading GIF
* images is included.</td>
* </tr>
* <tr valign="top">
* <td>GIF Create Support</td>
* <td>boolean value. <b>TRUE</b>
* if support for creating GIF
* images is included.</td>
* </tr>
* <tr valign="top">
* <td>JPEG Support</td>
* <td>boolean value. <b>TRUE</b>
* if JPEG support is included.</td>
* </tr>
* <tr valign="top">
* <td>PNG Support</td>
* <td>boolean value. <b>TRUE</b>
* if PNG support is included.</td>
* </tr>
* <tr valign="top">
* <td>WBMP Support</td>
* <td>boolean value. <b>TRUE</b>
* if WBMP support is included.</td>
* </tr>
* <tr valign="top">
* <td>XBM Support</td>
* <td>boolean value. <b>TRUE</b>
* if XBM support is included.</td>
* </tr>
* <tr valign="top">
* <td>WebP Support</td>
* <td>boolean value. <b>TRUE</b>
* if WebP support is included.</td>
* </tr>
* </table>
* </p>
* <p>
* Previous to PHP 5.3.0, the JPEG Support attribute was named
* JPG Support.
*/
function gd_info(): array {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Draws an arc
* @link http://php.net/manual/en/function.imagearc.php
* @param resource $image
* @param int $cx <p>
* x-coordinate of the center.
* </p>
* @param int $cy <p>
* y-coordinate of the center.
* </p>
* @param int $width <p>
* The arc width.
* </p>
* @param int $height <p>
* The arc height.
* </p>
* @param int $start <p>
* The arc start angle, in degrees.
* </p>
* @param int $end <p>
* The arc end angle, in degrees.
* 0° is located at the three-o'clock position, and the arc is drawn
* clockwise.
* </p>
* @param int $color <p>
* A color identifier created with
* <b>imagecolorallocate</b>.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imagearc($image, int $cx, int $cy, int $width, int $height, int $start, int $end, int $color): bool {}
/**
* (PHP 4 >= 4.0.6, PHP 5, PHP 7)<br/>
* Draw an ellipse
* @link http://php.net/manual/en/function.imageellipse.php
* @param resource $image
* @param int $cx <p>
* x-coordinate of the center.
* </p>
* @param int $cy <p>
* y-coordinate of the center.
* </p>
* @param int $width <p>
* The ellipse width.
* </p>
* @param int $height <p>
* The ellipse height.
* </p>
* @param int $color <p>
* The color of the ellipse. A color identifier created with
* <b>imagecolorallocate</b>.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imageellipse($image, int $cx, int $cy, int $width, int $height, int $color): bool {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Draw a character horizontally
* @link http://php.net/manual/en/function.imagechar.php
* @param resource $image
* @param int $font
* @param int $x <p>
* x-coordinate of the start.
* </p>
* @param int $y <p>
* y-coordinate of the start.
* </p>
* @param string $c <p>
* The character to draw.
* </p>
* @param int $color <p>
* A color identifier created with
* <b>imagecolorallocate</b>.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imagechar($image, int $font, int $x, int $y, string $c, int $color): bool {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Draw a character vertically
* @link http://php.net/manual/en/function.imagecharup.php
* @param resource $image
* @param int $font
* @param int $x <p>
* x-coordinate of the start.
* </p>
* @param int $y <p>
* y-coordinate of the start.
* </p>
* @param string $c <p>
* The character to draw.
* </p>
* @param int $color <p>
* A color identifier created with
* <b>imagecolorallocate</b>.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imagecharup($image, int $font, int $x, int $y, string $c, int $color): bool {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Get the index of the color of a pixel
* @link http://php.net/manual/en/function.imagecolorat.php
* @param resource $image
* @param int $x <p>
* x-coordinate of the point.
* </p>
* @param int $y <p>
* y-coordinate of the point.
* </p>
* @return int the index of the color.
*/
function imagecolorat($image, int $x, int $y): int {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Allocate a color for an image
* @link http://php.net/manual/en/function.imagecolorallocate.php
* @param resource $image
* @param int $red <p>Value of red component.</p>
* @param int $green <p>Value of green component.</p>
* @param int $blue <p>Value of blue component.</p>
* @return int A color identifier or <b>FALSE</b> if the allocation failed.
*/
function imagecolorallocate($image, int $red, int $green, int $blue): int {}
/**
* (PHP 4 >= 4.0.1, PHP 5, PHP 7)<br/>
* Copy the palette from one image to another
* @link http://php.net/manual/en/function.imagepalettecopy.php
* @param resource $destination <p>
* The destination image resource.
* </p>
* @param resource $source <p>
* The source image resource.
* </p>
* @return void No value is returned.
*/
function imagepalettecopy($destination, $source) {}
/**
* (PHP 4 >= 4.0.4, PHP 5, PHP 7)<br/>
* Create a new image from the image stream in the string
* @link http://php.net/manual/en/function.imagecreatefromstring.php
* @param string $image <p>
* A string containing the image data.
* </p>
* @return resource An image resource will be returned on success. <b>FALSE</b> is returned if
* the image type is unsupported, the data is not in a recognised format,
* or the image is corrupt and cannot be loaded.
*/
function imagecreatefromstring(string $image) {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Get the index of the closest color to the specified color
* @link http://php.net/manual/en/function.imagecolorclosest.php
* @param resource $image
* @param int $red <p>Value of red component.</p>
* @param int $green <p>Value of green component.</p>
* @param int $blue <p>Value of blue component.</p>
* @return int the index of the closest color, in the palette of the image, to
* the specified one
*/
function imagecolorclosest($image, int $red, int $green, int $blue): int {}
/**
* (PHP 4 >= 4.0.1, PHP 5, PHP 7)<br/>
* Get the index of the color which has the hue, white and blackness
* @link http://php.net/manual/en/function.imagecolorclosesthwb.php
* @param resource $image
* @param int $red <p>Value of red component.</p>
* @param int $green <p>Value of green component.</p>
* @param int $blue <p>Value of blue component.</p>
* @return int an integer with the index of the color which has
* the hue, white and blackness nearest the given color.
*/
function imagecolorclosesthwb($image, int $red, int $green, int $blue): int {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* De-allocate a color for an image
* @link http://php.net/manual/en/function.imagecolordeallocate.php
* @param resource $image
* @param int $color <p>
* The color identifier.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imagecolordeallocate($image, int $color): bool {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Get the index of the specified color or its closest possible alternative
* @link http://php.net/manual/en/function.imagecolorresolve.php
* @param resource $image
* @param int $red <p>Value of red component.</p>
* @param int $green <p>Value of green component.</p>
* @param int $blue <p>Value of blue component.</p>
* @return int a color index.
*/
function imagecolorresolve($image, int $red, int $green, int $blue): int {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Get the index of the specified color
* @link http://php.net/manual/en/function.imagecolorexact.php
* @param resource $image
* @param int $red <p>Value of red component.</p>
* @param int $green <p>Value of green component.</p>
* @param int $blue <p>Value of blue component.</p>
* @return int the index of the specified color in the palette, or -1 if the
* color does not exist.
*/
function imagecolorexact($image, int $red, int $green, int $blue): int {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Set the color for the specified palette index
* @link http://php.net/manual/en/function.imagecolorset.php
* @param resource $image
* @param int $index <p>
* An index in the palette.
* </p>
* @param int $red <p>Value of red component.</p>
* @param int $green <p>Value of green component.</p>
* @param int $blue <p>Value of blue component.</p>
* @param int $alpha [optional] <p>
* Value of alpha component.
* </p>
* @return void No value is returned.
*/
function imagecolorset($image, int $index, int $red, int $green, int $blue, int $alpha = 0) {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Define a color as transparent
* @link http://php.net/manual/en/function.imagecolortransparent.php
* @param resource $image
* @param int $color [optional] <p>
* A color identifier created with
* <b>imagecolorallocate</b>.
* </p>
* @return int The identifier of the new (or current, if none is specified)
* transparent color is returned. If <i>color</i>
* is not specified, and the image has no transparent color, the
* returned identifier will be -1.
*/
function imagecolortransparent($image, int $color = null): int {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Find out the number of colors in an image's palette
* @link http://php.net/manual/en/function.imagecolorstotal.php
* @param resource $image <p>
* An image resource, returned by one of the image creation functions, such
* as <b>imagecreatefromgif</b>.
* </p>
* @return int the number of colors in the specified image's palette or 0 for
* truecolor images.
*/
function imagecolorstotal($image): int {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Get the colors for an index
* @link http://php.net/manual/en/function.imagecolorsforindex.php
* @param resource $image
* @param int $index <p>
* The color index.
* </p>
* @return array an associative array with red, green, blue and alpha keys that
* contain the appropriate values for the specified color index.
*/
function imagecolorsforindex($image, int $index): array {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Copy part of an image
* @link http://php.net/manual/en/function.imagecopy.php
* @param resource $dst_im <p>Destination image link resource.</p>
* @param resource $src_im <p>Source image link resource.</p>
* @param int $dst_x <p>
* x-coordinate of destination point.
* </p>
* @param int $dst_y <p>
* y-coordinate of destination point.
* </p>
* @param int $src_x <p>
* x-coordinate of source point.
* </p>
* @param int $src_y <p>
* y-coordinate of source point.
* </p>
* @param int $src_w <p>Source width.</p>
* @param int $src_h <p>Source height.</p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imagecopy($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_w, int $src_h): bool {}
/**
* (PHP 4 >= 4.0.1, PHP 5, PHP 7)<br/>
* Copy and merge part of an image
* @link http://php.net/manual/en/function.imagecopymerge.php
* @param resource $dst_im <p>Destination image link resource.</p>
* @param resource $src_im <p>Source image link resource.</p>
* @param int $dst_x <p>
* x-coordinate of destination point.
* </p>
* @param int $dst_y <p>
* y-coordinate of destination point.
* </p>
* @param int $src_x <p>
* x-coordinate of source point.
* </p>
* @param int $src_y <p>
* y-coordinate of source point.
* </p>
* @param int $src_w <p>Source width.</p>
* @param int $src_h <p>Source height.</p>
* @param int $pct <p>
* The two images will be merged according to <i>pct</i>
* which can range from 0 to 100. When <i>pct</i> = 0,
* no action is taken, when 100 this function behaves identically
* to <b>imagecopy</b> for pallete images, except for
* ignoring alpha components, while it implements alpha transparency
* for true colour images.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imagecopymerge($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_w, int $src_h, int $pct): bool {}
/**
* (PHP 4 >= 4.0.6, PHP 5, PHP 7)<br/>
* Copy and merge part of an image with gray scale
* @link http://php.net/manual/en/function.imagecopymergegray.php
* @param resource $dst_im <p>Destination image link resource.</p>
* @param resource $src_im <p>Source image link resource.</p>
* @param int $dst_x <p>
* x-coordinate of destination point.
* </p>
* @param int $dst_y <p>
* y-coordinate of destination point.
* </p>
* @param int $src_x <p>
* x-coordinate of source point.
* </p>
* @param int $src_y <p>
* y-coordinate of source point.
* </p>
* @param int $src_w <p>Source width.</p>
* @param int $src_h <p>Source height.</p>
* @param int $pct <p>
* The <i>src_im</i> will be changed to grayscale according
* to <i>pct</i> where 0 is fully grayscale and 100 is
* unchanged. When <i>pct</i> = 100 this function behaves
* identically to <b>imagecopy</b> for pallete images, except for
* ignoring alpha components, while
* it implements alpha transparency for true colour images.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imagecopymergegray($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_w, int $src_h, int $pct): bool {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Copy and resize part of an image
* @link http://php.net/manual/en/function.imagecopyresized.php
* @param resource $dst_image <p>Destination image link resource.</p>
* @param resource $src_image <p>Source image link resource.</p>
* @param int $dst_x <p>
* x-coordinate of destination point.
* </p>
* @param int $dst_y <p>
* y-coordinate of destination point.
* </p>
* @param int $src_x <p>
* x-coordinate of source point.
* </p>
* @param int $src_y <p>
* y-coordinate of source point.
* </p>
* @param int $dst_w <p>
* Destination width.
* </p>
* @param int $dst_h <p>
* Destination height.
* </p>
* @param int $src_w <p>Source width.</p>
* @param int $src_h <p>Source height.</p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imagecopyresized($dst_image, $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_w, int $dst_h, int $src_w, int $src_h): bool {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Create a new palette based image
* @link http://php.net/manual/en/function.imagecreate.php
* @param int $width <p>
* The image width.
* </p>
* @param int $height <p>
* The image height.
* </p>
* @return resource an image resource identifier on success, <b>FALSE</b> on errors.
*/
function imagecreate(int $width, int $height) {}
/**
* (PHP 4 >= 4.0.6, PHP 5, PHP 7)<br/>
* Create a new true color image
* @link http://php.net/manual/en/function.imagecreatetruecolor.php
* @param int $width <p>
* Image width.
* </p>
* @param int $height <p>
* Image height.
* </p>
* @return resource an image resource identifier on success, <b>FALSE</b> on errors.
*/
function imagecreatetruecolor(int $width, int $height) {}
/**
* (PHP 4 >= 4.3.2, PHP 5, PHP 7)<br/>
* Finds whether an image is a truecolor image
* @link http://php.net/manual/en/function.imageistruecolor.php
* @param resource $image
* @return bool <b>TRUE</b> if the <i>image</i> is truecolor, <b>FALSE</b>
* otherwise.
*/
function imageistruecolor($image): bool {}
/**
* (PHP 4 >= 4.0.6, PHP 5, PHP 7)<br/>
* Convert a true color image to a palette image
* @link http://php.net/manual/en/function.imagetruecolortopalette.php
* @param resource $image
* @param bool $dither <p>
* Indicates if the image should be dithered - if it is <b>TRUE</b> then
* dithering will be used which will result in a more speckled image but
* with better color approximation.
* </p>
* @param int $ncolors <p>
* Sets the maximum number of colors that should be retained in the palette.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imagetruecolortopalette($image, bool $dither, int $ncolors): bool {}
/**
* (PHP 5 >= 5.5.0, PHP 7)<br/>
* Converts a palette based image to true color
* @link http://php.net/manual/en/function.imagepalettetotruecolor.php
* @param resource $src
* @return bool <b>TRUE</b> if the convertion was complete, or if the source image already
* is a true color image, otherwise <b>FALSE</b> is returned.
*/
function imagepalettetotruecolor($src): bool {}
/**
* (PHP 4 >= 4.0.6, PHP 5, PHP 7)<br/>
* Set the thickness for line drawing
* @link http://php.net/manual/en/function.imagesetthickness.php
* @param resource $image
* @param int $thickness <p>
* Thickness, in pixels.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imagesetthickness($image, int $thickness): bool {}
/**
* (PHP 4 >= 4.0.6, PHP 5, PHP 7)<br/>
* Draw a partial arc and fill it
* @link http://php.net/manual/en/function.imagefilledarc.php
* @param resource $image
* @param int $cx <p>
* x-coordinate of the center.
* </p>
* @param int $cy <p>
* y-coordinate of the center.
* </p>
* @param int $width <p>
* The arc width.
* </p>
* @param int $height <p>
* The arc height.
* </p>
* @param int $start <p>
* The arc start angle, in degrees.
* </p>
* @param int $end <p>
* The arc end angle, in degrees.
* 0° is located at the three-o'clock position, and the arc is drawn
* clockwise.
* </p>
* @param int $color <p>
* A color identifier created with
* <b>imagecolorallocate</b>.
* </p>
* @param int $style <p>
* A bitwise OR of the following possibilities:
* <b>IMG_ARC_PIE</b>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imagefilledarc($image, int $cx, int $cy, int $width, int $height, int $start, int $end, int $color, int $style): bool {}
/**
* (PHP 4 >= 4.0.6, PHP 5, PHP 7)<br/>
* Draw a filled ellipse
* @link http://php.net/manual/en/function.imagefilledellipse.php
* @param resource $image
* @param int $cx <p>
* x-coordinate of the center.
* </p>
* @param int $cy <p>
* y-coordinate of the center.
* </p>
* @param int $width <p>
* The ellipse width.
* </p>
* @param int $height <p>
* The ellipse height.
* </p>
* @param int $color <p>
* The fill color. A color identifier created with
* <b>imagecolorallocate</b>.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imagefilledellipse($image, int $cx, int $cy, int $width, int $height, int $color): bool {}
/**
* (PHP 4 >= 4.0.6, PHP 5, PHP 7)<br/>
* Set the blending mode for an image
* @link http://php.net/manual/en/function.imagealphablending.php
* @param resource $image
* @param bool $blendmode <p>
* Whether to enable the blending mode or not. On true color images
* the default value is <b>TRUE</b> otherwise the default value is <b>FALSE</b>
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imagealphablending($image, bool $blendmode): bool {}
/**
* (PHP 4 >= 4.3.2, PHP 5, PHP 7)<br/>
* Set the flag to save full alpha channel information (as opposed to single-color transparency) when saving PNG images
* @link http://php.net/manual/en/function.imagesavealpha.php
* @param resource $image
* @param bool $saveflag <p>
* Whether to save the alpha channel or not. Default to <b>FALSE</b>.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imagesavealpha($image, bool $saveflag): bool {}
/**
* (PHP 4 >= 4.3.2, PHP 5, PHP 7)<br/>
* Allocate a color for an image
* @link http://php.net/manual/en/function.imagecolorallocatealpha.php
* @param resource $image
* @param int $red <p>Value of red component.</p>
* @param int $green <p>Value of green component.</p>
* @param int $blue <p>Value of blue component.</p>
* @param int $alpha <p>
* A value between 0 and 127.
* 0 indicates completely opaque while
* 127 indicates completely transparent.
* </p>
* @return int A color identifier or <b>FALSE</b> if the allocation failed.
*/
function imagecolorallocatealpha($image, int $red, int $green, int $blue, int $alpha): int {}
/**
* (PHP 4 >= 4.0.6, PHP 5, PHP 7)<br/>
* Get the index of the specified color + alpha or its closest possible alternative
* @link http://php.net/manual/en/function.imagecolorresolvealpha.php
* @param resource $image
* @param int $red <p>Value of red component.</p>
* @param int $green <p>Value of green component.</p>
* @param int $blue <p>Value of blue component.</p>
* @param int $alpha <p>
* A value between 0 and 127.
* 0 indicates completely opaque while
* 127 indicates completely transparent.
* </p>
* @return int a color index.
*/
function imagecolorresolvealpha($image, int $red, int $green, int $blue, int $alpha): int {}
/**
* (PHP 4 >= 4.0.6, PHP 5, PHP 7)<br/>
* Get the index of the closest color to the specified color + alpha
* @link http://php.net/manual/en/function.imagecolorclosestalpha.php
* @param resource $image
* @param int $red <p>Value of red component.</p>
* @param int $green <p>Value of green component.</p>
* @param int $blue <p>Value of blue component.</p>
* @param int $alpha <p>
* A value between 0 and 127.
* 0 indicates completely opaque while
* 127 indicates completely transparent.
* </p>
* @return int the index of the closest color in the palette.
*/
function imagecolorclosestalpha($image, int $red, int $green, int $blue, int $alpha): int {}
/**
* (PHP 4 >= 4.0.6, PHP 5, PHP 7)<br/>
* Get the index of the specified color + alpha
* @link http://php.net/manual/en/function.imagecolorexactalpha.php
* @param resource $image
* @param int $red <p>Value of red component.</p>
* @param int $green <p>Value of green component.</p>
* @param int $blue <p>Value of blue component.</p>
* @param int $alpha <p>
* A value between 0 and 127.
* 0 indicates completely opaque while
* 127 indicates completely transparent.
* </p>
* @return int the index of the specified color+alpha in the palette of the
* image, or -1 if the color does not exist in the image's palette.
*/
function imagecolorexactalpha($image, int $red, int $green, int $blue, int $alpha): int {}
/**
* (PHP 4 >= 4.0.6, PHP 5, PHP 7)<br/>
* Copy and resize part of an image with resampling
* @link http://php.net/manual/en/function.imagecopyresampled.php
* @param resource $dst_image <p>Destination image link resource.</p>
* @param resource $src_image <p>Source image link resource.</p>
* @param int $dst_x <p>
* x-coordinate of destination point.
* </p>
* @param int $dst_y <p>
* y-coordinate of destination point.
* </p>
* @param int $src_x <p>
* x-coordinate of source point.
* </p>
* @param int $src_y <p>
* y-coordinate of source point.
* </p>
* @param int $dst_w <p>
* Destination width.
* </p>
* @param int $dst_h <p>
* Destination height.
* </p>
* @param int $src_w <p>Source width.</p>
* @param int $src_h <p>Source height.</p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imagecopyresampled($dst_image, $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_w, int $dst_h, int $src_w, int $src_h): bool {}
/**
* (PHP 4 >= 4.3.0, PHP 5, PHP 7)<br/>
* Rotate an image with a given angle
* @link http://php.net/manual/en/function.imagerotate.php
* @param resource $image
* @param float $angle <p>
* Rotation angle, in degrees. The rotation angle is interpreted as the
* number of degrees to rotate the image anticlockwise.
* </p>
* @param int $bgd_color <p>
* Specifies the color of the uncovered zone after the rotation
* </p>
* @param int $ignore_transparent [optional] <p>
* If set and non-zero, transparent colors are ignored (otherwise kept).
* </p>
* @return resource an image resource for the rotated image, or <b>FALSE</b> on failure.
*/
function imagerotate($image, float $angle, int $bgd_color, int $ignore_transparent = 0) {}
/**
* (PHP 5 >= 5.5.0, PHP 7)<br/>
* Flips an image using a given mode
* @link http://php.net/manual/en/function.imageflip.php
* @param resource $image
* @param int $mode <p>
* Flip mode, this can be one of the <b>IMG_FLIP_*</b> constants:
* </p>
* <p>
* <tr valign="top">
* <td>Constant</td>
* <td>Meaning</td>
* </tr>
* <tr valign="top">
* <td><b>IMG_FLIP_HORIZONTAL</b></td>
* <td>
* Flips the image horizontally.
* </td>
* </tr>
* <tr valign="top">
* <td><b>IMG_FLIP_VERTICAL</b></td>
* <td>
* Flips the image vertically.
* </td>
* </tr>
* <tr valign="top">
* <td><b>IMG_FLIP_BOTH</b></td>
* <td>
* Flips the image both horizontally and vertically.
* </td>
* </tr>
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imageflip($image, int $mode): bool {}
/**
* (PHP 5 >= 5.5.0, PHP 7)<br/>
* Crop an image using the given coordinates and size, x, y, width and height
* @link http://php.net/manual/en/function.imagecrop.php
* @param resource $image
* @param array $rect <p>
* Array with keys "x", "y", "width" and "height".
* </p>
* @return resource Return cropped image resource on success or <b>FALSE</b> on failure.
*/
function imagecrop($image, array $rect) {}
/**
* (PHP 5 >= 5.5.0, PHP 7)<br/>
* Crop an image automatically using one of the available modes
* @link http://php.net/manual/en/function.imagecropauto.php
* @param resource $image
* @param int $mode [optional] <p>
* One of <b>IMG_CROP_*</b> constants.
* </p>
* @param float $threshold [optional] <p>
* Used in <b>IMG_CROP_THRESHOLD</b> mode.
* </p>
* @param int $color [optional] <p>
* Used in <b>IMG_CROP_THRESHOLD</b> mode.
* </p>
* @return resource Return cropped image resource on success or <b>FALSE</b> on failure.
*/
function imagecropauto($image, int $mode = -1, float $threshold = .5, int $color = -1) {}
/**
* (PHP 5 >= 5.5.0, PHP 7)<br/>
* Scale an image using the given new width and height
* @link http://php.net/manual/en/function.imagescale.php
* @param resource $image
* @param int $new_width <p>
* The width to scale the image to.
* </p>
* @param int $new_height [optional] <p>
* The height to scale the image to. If omitted or negative, the aspect
* ratio will be preserved.
* </p>
* <p>
* You should always provide the height if using PHP 5.5.18 or earlier, or
* PHP 5.6.2 or earlier, as the aspect ratio calculation was incorrect.
* </p>
* @param int $mode [optional] <p>
* One of <b>IMG_NEAREST_NEIGHBOUR</b>,
* <b>IMG_BILINEAR_FIXED</b>,
* <b>IMG_BICUBIC</b>,
* <b>IMG_BICUBIC_FIXED</b> or anything else (will use two
* pass).
* </p>
* @return resource Return the scaled image resource on success or <b>FALSE</b> on failure.
*/
function imagescale($image, int $new_width, int $new_height = -1, int $mode = IMG_BILINEAR_FIXED) {}
/**
* (PHP 5 >= 5.5.0, PHP 7)<br/>
* Return an image containing the affine transformed src image, using an optional clipping area
* @link http://php.net/manual/en/function.imageaffine.php
* @param resource $image
* @param array $affine <p>
* Array with keys 0 to 5.
* </p>
* @param array $clip [optional] <p>
* Array with keys "x", "y", "width" and "height".
* </p>
* @return resource Return affined image resource on success or <b>FALSE</b> on failure.
*/
function imageaffine($image, array $affine, array $clip = null) {}
/**
* (PHP 5 >= 5.5.0, PHP 7)<br/>
* Concat two matrices (as in doing many ops in one go)
* @link http://php.net/manual/en/function.imageaffinematrixconcat.php
* @param array $m1 <p>
* Array with keys 0 to 5.
* </p>
* @param array $m2 <p>
* Array with keys 0 to 5.
* </p>
* @return array Array with keys 0 to 5 and float values or <b>FALSE</b> on failure.
*/
function imageaffinematrixconcat(array $m1, array $m2): array {}
/**
* (PHP 5 >= 5.5.0, PHP 7)<br/>
* Return an image containing the affine tramsformed src image, using an optional clipping area
* @link http://php.net/manual/en/function.imageaffinematrixget.php
* @param int $type <p>
* One of <b>IMG_AFFINE_*</b> constants.
* </p>
* @param mixed $options [optional] <p>
* </p>
* @return array Array with keys 0 to 5 and float values or <b>FALSE</b> on failure.
*/
function imageaffinematrixget(int $type, $options = null): array {}
/**
* (PHP 5 >= 5.5.0, PHP 7)<br/>
* Set the interpolation method
* @link http://php.net/manual/en/function.imagesetinterpolation.php
* @param resource $image
* @param int $method [optional] <p>
* The interpolation method, which can be one of the following:
* <b>IMG_BELL</b>: Bell filter.
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imagesetinterpolation($image, int $method = IMG_BILINEAR_FIXED): bool {}
/**
* (PHP 4 >= 4.0.6, PHP 5, PHP 7)<br/>
* Set the tile image for filling
* @link http://php.net/manual/en/function.imagesettile.php
* @param resource $image
* @param resource $tile <p>
* The image resource to be used as a tile.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imagesettile($image, $tile): bool {}
/**
* (PHP 4 >= 4.0.6, PHP 5, PHP 7)<br/>
* Set the brush image for line drawing
* @link http://php.net/manual/en/function.imagesetbrush.php
* @param resource $image
* @param resource $brush <p>
* An image resource.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imagesetbrush($image, $brush): bool {}
/**
* (PHP 4 >= 4.0.6, PHP 5, PHP 7)<br/>
* Set the style for line drawing
* @link http://php.net/manual/en/function.imagesetstyle.php
* @param resource $image
* @param array $style <p>
* An array of pixel colors. You can use the
* <b>IMG_COLOR_TRANSPARENT</b> constant to add a
* transparent pixel.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function imagesetstyle($image, array $style): bool {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Create a new image from file or URL
* @link http://php.net/manual/en/function.imagecreatefrompng.php
* @param string $filename <p>
* Path to the PNG image.
* </p>
* @return resource an image resource identifier on success, <b>FALSE</b> on errors.
*/
function imagecreatefrompng(string $filename) {}
/**
* (PHP 5 >= 5.5.0, PHP 7)<br/>
* Create a new image from file or URL
* @link http://php.net/manual/en/function.imagecreatefromwebp.php
* @param string $filename <p>
* Path to the WebP image.
* </p>
* @return resource an image resource identifier on success, <b>FALSE</b> on errors.
*/
function imagecreatefromwebp(string $filename) {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Create a new image from file or URL
* @link http://php.net/manual/en/function.imagecreatefromgif.php
* @param string $filename <p>
* Path to the GIF image.
* </p>
* @return resource an image resource identifier on success, <b>FALSE</b> on errors.
*/
function imagecreatefromgif(string $filename) {}
/**
* (PHP 4, PHP 5, PHP 7)<br/>
* Create a new image from file or URL
* @link http://php.net/manual/en/function.imagecreatefromjpeg.php
* @param string $filename <p>
* Path to the JPEG image.
* </p>
* @return resource an image resource identifier on success, <b>FALSE</b> on errors.
*/
function imagecreatefromjpeg(string $filename) {}
/**
* (PHP 4 >= 4.0.1, PHP 5, PHP 7)<br/>
* Create a new image from file or URL
* @link http://php.net/manual/en/function.imagecreatefromwbmp.php
* @param string $filename <p>
* Path to the WBMP image.