xref: /PHP-8.4/ext/gd/gd.stub.php (revision b0d8c10f)
1<?php
2
3/** @generate-class-entries */
4
5/**
6 * @var int
7 * @cvalue PHP_IMG_AVIF
8 */
9const IMG_AVIF = UNKNOWN;
10/**
11 * @var int
12 * @cvalue PHP_IMG_GIF
13 */
14const IMG_GIF = UNKNOWN;
15/**
16 * @var int
17 * @cvalue PHP_IMG_JPG
18 */
19const IMG_JPG = UNKNOWN;
20/**
21 * @var int
22 * @cvalue PHP_IMG_JPEG
23 */
24const IMG_JPEG = UNKNOWN;
25/**
26 * @var int
27 * @cvalue PHP_IMG_PNG
28 */
29const IMG_PNG = UNKNOWN;
30/**
31 * @var int
32 * @cvalue PHP_IMG_WBMP
33 */
34const IMG_WBMP = UNKNOWN;
35/**
36 * @var int
37 * @cvalue PHP_IMG_XPM
38 */
39const IMG_XPM = UNKNOWN;
40/**
41 * @var int
42 * @cvalue PHP_IMG_WEBP
43 */
44const IMG_WEBP = UNKNOWN;
45/**
46 * @var int
47 * @cvalue PHP_IMG_BMP
48 */
49const IMG_BMP = UNKNOWN;
50/**
51 * @var int
52 * @cvalue PHP_IMG_TGA
53 */
54const IMG_TGA = UNKNOWN;
55
56/* constant for webp encoding */
57
58#ifdef gdWebpLossless
59/**
60 * @var int
61 * @cvalue gdWebpLossless
62 */
63const IMG_WEBP_LOSSLESS = UNKNOWN;
64#endif
65
66/* special colours for gd */
67
68/**
69 * @var int
70 * @cvalue gdTiled
71 */
72const IMG_COLOR_TILED = UNKNOWN;
73/**
74 * @var int
75 * @cvalue gdStyled
76 */
77const IMG_COLOR_STYLED = UNKNOWN;
78/**
79 * @var int
80 * @cvalue gdBrushed
81 */
82const IMG_COLOR_BRUSHED = UNKNOWN;
83/**
84 * @var int
85 * @cvalue gdStyledBrushed
86 */
87const IMG_COLOR_STYLEDBRUSHED = UNKNOWN;
88/**
89 * @var int
90 * @cvalue gdTransparent
91 */
92const IMG_COLOR_TRANSPARENT = UNKNOWN;
93
94/* for imagefilledarc */
95
96/**
97 * @var int
98 * @cvalue gdArc
99 */
100const IMG_ARC_ROUNDED = UNKNOWN;
101/**
102 * @var int
103 * @cvalue gdPie
104 */
105const IMG_ARC_PIE = UNKNOWN;
106/**
107 * @var int
108 * @cvalue gdChord
109 */
110const IMG_ARC_CHORD = UNKNOWN;
111/**
112 * @var int
113 * @cvalue gdNoFill
114 */
115const IMG_ARC_NOFILL = UNKNOWN;
116/**
117 * @var int
118 * @cvalue gdEdged
119 */
120const IMG_ARC_EDGED = UNKNOWN;
121
122/* GD2 image format types */
123
124/**
125 * @var int
126 * @cvalue GD2_FMT_RAW
127 */
128const IMG_GD2_RAW = UNKNOWN;
129/**
130 * @var int
131 * @cvalue GD2_FMT_COMPRESSED
132 */
133const IMG_GD2_COMPRESSED = UNKNOWN;
134/**
135 * @var int
136 * @cvalue PHP_GD_FLIP_HORIZONTAL
137 */
138const IMG_FLIP_HORIZONTAL = UNKNOWN;
139/**
140 * @var int
141 * @cvalue PHP_GD_FLIP_VERTICAL
142 */
143const IMG_FLIP_VERTICAL = UNKNOWN;
144/**
145 * @var int
146 * @cvalue PHP_GD_FLIP_BOTH
147 */
148const IMG_FLIP_BOTH = UNKNOWN;
149/**
150 * @var int
151 * @cvalue gdEffectReplace
152 */
153const IMG_EFFECT_REPLACE = UNKNOWN;
154/**
155 * @var int
156 * @cvalue gdEffectAlphaBlend
157 */
158const IMG_EFFECT_ALPHABLEND = UNKNOWN;
159/**
160 * @var int
161 * @cvalue gdEffectNormal
162 */
163const IMG_EFFECT_NORMAL = UNKNOWN;
164/**
165 * @var int
166 * @cvalue gdEffectOverlay
167 */
168const IMG_EFFECT_OVERLAY = UNKNOWN;
169
170#ifdef gdEffectMultiply
171/**
172 * @var int
173 * @cvalue gdEffectMultiply
174 */
175const IMG_EFFECT_MULTIPLY = UNKNOWN;
176#endif
177
178/**
179 * @var int
180 * @cvalue GD_CROP_DEFAULT
181 */
182const IMG_CROP_DEFAULT = UNKNOWN;
183/**
184 * @var int
185 * @cvalue GD_CROP_TRANSPARENT
186 */
187const IMG_CROP_TRANSPARENT = UNKNOWN;
188/**
189 * @var int
190 * @cvalue GD_CROP_BLACK
191 */
192const IMG_CROP_BLACK = UNKNOWN;
193/**
194 * @var int
195 * @cvalue GD_CROP_WHITE
196 */
197const IMG_CROP_WHITE = UNKNOWN;
198/**
199 * @var int
200 * @cvalue GD_CROP_SIDES
201 */
202const IMG_CROP_SIDES = UNKNOWN;
203/**
204 * @var int
205 * @cvalue GD_CROP_THRESHOLD
206 */
207const IMG_CROP_THRESHOLD = UNKNOWN;
208
209/**
210 * @var int
211 * @cvalue GD_BELL
212 */
213const IMG_BELL = UNKNOWN;
214/**
215 * @var int
216 * @cvalue GD_BESSEL
217 */
218const IMG_BESSEL = UNKNOWN;
219/**
220 * @var int
221 * @cvalue GD_BILINEAR_FIXED
222 */
223const IMG_BILINEAR_FIXED = UNKNOWN;
224/**
225 * @var int
226 * @cvalue GD_BICUBIC
227 */
228const IMG_BICUBIC = UNKNOWN;
229/**
230 * @var int
231 * @cvalue GD_BICUBIC_FIXED
232 */
233const IMG_BICUBIC_FIXED = UNKNOWN;
234/**
235 * @var int
236 * @cvalue GD_BLACKMAN
237 */
238const IMG_BLACKMAN = UNKNOWN;
239/**
240 * @var int
241 * @cvalue GD_BOX
242 */
243const IMG_BOX = UNKNOWN;
244/**
245 * @var int
246 * @cvalue GD_BSPLINE
247 */
248const IMG_BSPLINE = UNKNOWN;
249/**
250 * @var int
251 * @cvalue GD_CATMULLROM
252 */
253const IMG_CATMULLROM = UNKNOWN;
254/**
255 * @var int
256 * @cvalue GD_GAUSSIAN
257 */
258const IMG_GAUSSIAN = UNKNOWN;
259/**
260 * @var int
261 * @cvalue GD_GENERALIZED_CUBIC
262 */
263const IMG_GENERALIZED_CUBIC = UNKNOWN;
264/**
265 * @var int
266 * @cvalue GD_HERMITE
267 */
268const IMG_HERMITE = UNKNOWN;
269/**
270 * @var int
271 * @cvalue GD_HAMMING
272 */
273const IMG_HAMMING = UNKNOWN;
274/**
275 * @var int
276 * @cvalue GD_HANNING
277 */
278const IMG_HANNING = UNKNOWN;
279/**
280 * @var int
281 * @cvalue GD_MITCHELL
282 */
283const IMG_MITCHELL = UNKNOWN;
284/**
285 * @var int
286 * @cvalue GD_POWER
287 */
288const IMG_POWER = UNKNOWN;
289/**
290 * @var int
291 * @cvalue GD_QUADRATIC
292 */
293const IMG_QUADRATIC = UNKNOWN;
294/**
295 * @var int
296 * @cvalue GD_SINC
297 */
298const IMG_SINC = UNKNOWN;
299/**
300 * @var int
301 * @cvalue GD_NEAREST_NEIGHBOUR
302 */
303const IMG_NEAREST_NEIGHBOUR = UNKNOWN;
304/**
305 * @var int
306 * @cvalue GD_WEIGHTED4
307 */
308const IMG_WEIGHTED4 = UNKNOWN;
309/**
310 * @var int
311 * @cvalue GD_TRIANGLE
312 */
313const IMG_TRIANGLE = UNKNOWN;
314
315/**
316 * @var int
317 * @cvalue GD_AFFINE_TRANSLATE
318 */
319const IMG_AFFINE_TRANSLATE = UNKNOWN;
320/**
321 * @var int
322 * @cvalue GD_AFFINE_SCALE
323 */
324const IMG_AFFINE_SCALE = UNKNOWN;
325/**
326 * @var int
327 * @cvalue GD_AFFINE_ROTATE
328 */
329const IMG_AFFINE_ROTATE = UNKNOWN;
330/**
331 * @var int
332 * @cvalue GD_AFFINE_SHEAR_HORIZONTAL
333 */
334const IMG_AFFINE_SHEAR_HORIZONTAL = UNKNOWN;
335/**
336 * @var int
337 * @cvalue GD_AFFINE_SHEAR_VERTICAL
338 */
339const IMG_AFFINE_SHEAR_VERTICAL = UNKNOWN;
340
341/**
342 * @var int
343 * @cvalue GD_BUNDLED
344 */
345const GD_BUNDLED = UNKNOWN;
346
347/* Section Filters */
348
349/**
350 * @var int
351 * @cvalue IMAGE_FILTER_NEGATE
352 */
353const IMG_FILTER_NEGATE = UNKNOWN;
354/**
355 * @var int
356 * @cvalue IMAGE_FILTER_GRAYSCALE
357 */
358const IMG_FILTER_GRAYSCALE = UNKNOWN;
359/**
360 * @var int
361 * @cvalue IMAGE_FILTER_BRIGHTNESS
362 */
363const IMG_FILTER_BRIGHTNESS = UNKNOWN;
364/**
365 * @var int
366 * @cvalue IMAGE_FILTER_CONTRAST
367 */
368const IMG_FILTER_CONTRAST = UNKNOWN;
369/**
370 * @var int
371 * @cvalue IMAGE_FILTER_COLORIZE
372 */
373const IMG_FILTER_COLORIZE = UNKNOWN;
374/**
375 * @var int
376 * @cvalue IMAGE_FILTER_EDGEDETECT
377 */
378const IMG_FILTER_EDGEDETECT = UNKNOWN;
379/**
380 * @var int
381 * @cvalue IMAGE_FILTER_GAUSSIAN_BLUR
382 */
383const IMG_FILTER_GAUSSIAN_BLUR = UNKNOWN;
384/**
385 * @var int
386 * @cvalue IMAGE_FILTER_SELECTIVE_BLUR
387 */
388const IMG_FILTER_SELECTIVE_BLUR = UNKNOWN;
389/**
390 * @var int
391 * @cvalue IMAGE_FILTER_EMBOSS
392 */
393const IMG_FILTER_EMBOSS = UNKNOWN;
394/**
395 * @var int
396 * @cvalue IMAGE_FILTER_MEAN_REMOVAL
397 */
398const IMG_FILTER_MEAN_REMOVAL = UNKNOWN;
399/**
400 * @var int
401 * @cvalue IMAGE_FILTER_SMOOTH
402 */
403const IMG_FILTER_SMOOTH = UNKNOWN;
404/**
405 * @var int
406 * @cvalue IMAGE_FILTER_PIXELATE
407 */
408const IMG_FILTER_PIXELATE = UNKNOWN;
409/**
410 * @var int
411 * @cvalue IMAGE_FILTER_SCATTER
412 */
413const IMG_FILTER_SCATTER = UNKNOWN;
414
415#ifdef GD_VERSION_STRING
416/**
417 * @var string
418 * @cvalue GD_VERSION_STRING
419 */
420const GD_VERSION = UNKNOWN;
421#endif
422
423#if (defined(GD_MAJOR_VERSION) && defined(GD_MINOR_VERSION) && defined(GD_RELEASE_VERSION) && defined(GD_EXTRA_VERSION))
424/**
425 * @var int
426 * @cvalue GD_MAJOR_VERSION
427 */
428const GD_MAJOR_VERSION = UNKNOWN;
429/**
430 * @var int
431 * @cvalue GD_MINOR_VERSION
432 */
433const GD_MINOR_VERSION = UNKNOWN;
434/**
435 * @var int
436 * @cvalue GD_RELEASE_VERSION
437 */
438const GD_RELEASE_VERSION = UNKNOWN;
439/**
440 * @var string
441 * @cvalue GD_EXTRA_VERSION
442 */
443const GD_EXTRA_VERSION = UNKNOWN;
444#endif
445
446#ifdef HAVE_GD_PNG
447/*
448 * cannot include #include "png.h"
449 * /usr/include/pngconf.h:310:2: error: #error png.h already includes setjmp.h with some additional fixup.
450 * as error, use the values for now...
451 */
452/** @var int */
453const PNG_NO_FILTER = 0x00;
454/** @var int */
455const PNG_FILTER_NONE = 0x08;
456/** @var int */
457const PNG_FILTER_SUB = 0x10;
458/** @var int */
459const PNG_FILTER_UP = 0x20;
460/** @var int */
461const PNG_FILTER_AVG = 0x40;
462/** @var int */
463const PNG_FILTER_PAETH = 0x80;
464/** @var int */
465const PNG_ALL_FILTERS = 0x08 | 0x10 | 0x20 | 0x40 | 0x80;
466#endif
467
468/**
469 * @strict-properties
470 * @not-serializable
471 */
472final class GdImage {}
473
474/**
475 * @strict-properties
476 * @not-serializable
477 */
478final class GdFont {}
479
480/**
481 * @return array<string, string|bool>
482 * @refcount 1
483 */
484function gd_info(): array {}
485
486function imageloadfont(string $filename): GdFont|false {}
487
488function imagesetstyle(GdImage $image, array $style): bool {}
489
490/** @refcount 1 */
491function imagecreatetruecolor(int $width, int $height): GdImage|false {}
492
493function imageistruecolor(GdImage $image): bool {}
494
495function imagetruecolortopalette(GdImage $image, bool $dither, int $num_colors): bool {}
496
497function imagepalettetotruecolor(GdImage $image): bool {}
498
499function imagecolormatch(GdImage $image1, GdImage $image2): bool {}
500
501function imagesetthickness(GdImage $image, int $thickness): bool {}
502
503function imagefilledellipse(GdImage $image, int $center_x, int $center_y, int $width, int $height, int $color): bool {}
504
505function imagefilledarc(GdImage $image, int $center_x, int $center_y, int $width, int $height, int $start_angle, int $end_angle, int $color, int $style): bool {}
506
507function imagealphablending(GdImage $image, bool $enable): bool {}
508
509function imagesavealpha(GdImage $image, bool $enable): bool {}
510
511function imagelayereffect(GdImage $image, int $effect): bool {}
512
513function imagecolorallocatealpha(GdImage $image, int $red, int $green, int $blue, int $alpha): int|false {}
514
515function imagecolorresolvealpha(GdImage $image, int $red, int $green, int $blue, int $alpha): int {}
516
517function imagecolorclosestalpha(GdImage $image, int $red, int $green, int $blue, int $alpha): int {}
518
519function imagecolorexactalpha(GdImage $image, int $red, int $green, int $blue, int $alpha): int {}
520
521function imagecopyresampled(GdImage $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_width, int $dst_height, int $src_width, int $src_height): bool {}
522
523#ifdef PHP_WIN32
524
525/** @refcount 1 */
526function imagegrabwindow(int $handle, bool $client_area = false): GdImage|false {}
527
528/** @refcount 1 */
529function imagegrabscreen(): GdImage|false {}
530
531#endif
532
533/** @refcount 1 */
534function imagerotate(GdImage $image, float $angle, int $background_color): GdImage|false {}
535
536function imagesettile(GdImage $image, GdImage $tile): bool {}
537
538function imagesetbrush(GdImage $image, GdImage $brush): bool {}
539
540/** @refcount 1 */
541function imagecreate(int $width, int $height): GdImage|false {}
542
543/** @compile-time-eval */
544function imagetypes(): int {}
545
546/** @refcount 1 */
547function imagecreatefromstring(string $data): GdImage|false {}
548
549#ifdef HAVE_GD_AVIF
550/** @refcount 1 */
551function imagecreatefromavif(string $filename): GdImage|false {}
552#endif
553
554/** @refcount 1 */
555function imagecreatefromgif(string $filename): GdImage|false {}
556
557#ifdef HAVE_GD_JPG
558/** @refcount 1 */
559function imagecreatefromjpeg(string $filename): GdImage|false {}
560#endif
561
562#ifdef HAVE_GD_PNG
563/** @refcount 1 */
564function imagecreatefrompng(string $filename): GdImage|false {}
565#endif
566
567#ifdef HAVE_GD_WEBP
568/** @refcount 1 */
569function imagecreatefromwebp(string $filename): GdImage|false {}
570#endif
571
572/** @refcount 1 */
573function imagecreatefromxbm(string $filename): GdImage|false {}
574
575#ifdef HAVE_GD_XPM
576/** @refcount 1 */
577function imagecreatefromxpm(string $filename): GdImage|false {}
578#endif
579
580/** @refcount 1 */
581function imagecreatefromwbmp(string $filename): GdImage|false {}
582
583/** @refcount 1 */
584function imagecreatefromgd(string $filename): GdImage|false {}
585
586/** @refcount 1 */
587function imagecreatefromgd2(string $filename): GdImage|false {}
588
589/** @refcount 1 */
590function imagecreatefromgd2part(string $filename, int $x, int $y, int $width, int $height): GdImage|false {}
591
592#ifdef HAVE_GD_BMP
593/** @refcount 1 */
594function imagecreatefrombmp(string $filename): GdImage|false {}
595#endif
596
597#ifdef HAVE_GD_TGA
598function imagecreatefromtga(string $filename): GdImage|false {}
599#endif
600
601function imagexbm(GdImage $image, ?string $filename, ?int $foreground_color = null): bool {}
602
603#ifdef HAVE_GD_AVIF
604/** @param resource|string|null $file */
605function imageavif(GdImage $image, $file = null, int $quality = -1, int $speed = -1): bool {}
606#endif
607
608/** @param resource|string|null $file */
609function imagegif(GdImage $image, $file = null): bool {}
610
611#ifdef HAVE_GD_PNG
612/** @param resource|string|null $file */
613function imagepng(GdImage $image, $file = null, int $quality = -1, int $filters = -1): bool {}
614#endif
615
616#ifdef HAVE_GD_WEBP
617/** @param resource|string|null $file */
618function imagewebp(GdImage $image, $file = null, int $quality = -1): bool {}
619#endif
620
621#ifdef HAVE_GD_JPG
622/** @param resource|string|null $file */
623function imagejpeg(GdImage $image, $file = null, int $quality = -1): bool {}
624#endif
625
626/** @param resource|string|null $file */
627function imagewbmp(GdImage $image, $file = null, ?int $foreground_color = null): bool {}
628
629function imagegd(GdImage $image, ?string $file = null): bool {}
630
631function imagegd2(GdImage $image, ?string $file = null, int $chunk_size = 128, int $mode = IMG_GD2_RAW): bool {}
632
633#ifdef HAVE_GD_BMP
634/** @param resource|string|null $file */
635function imagebmp(GdImage $image, $file = null, bool $compressed = true): bool {}
636#endif
637
638function imagedestroy(GdImage $image): bool {}
639
640function imagecolorallocate(GdImage $image, int $red, int $green, int $blue): int|false {}
641
642function imagepalettecopy(GdImage $dst, GdImage $src): void {}
643
644function imagecolorat(GdImage $image, int $x, int $y): int|false {}
645
646function imagecolorclosest(GdImage $image, int $red, int $green, int $blue): int {}
647
648function imagecolorclosesthwb(GdImage $image, int $red, int $green, int $blue): int {}
649
650function imagecolordeallocate(GdImage $image, int $color): bool {}
651
652function imagecolorresolve(GdImage $image, int $red, int $green, int $blue): int {}
653
654function imagecolorexact(GdImage $image, int $red, int $green, int $blue): int {}
655
656function imagecolorset(GdImage $image, int $color, int $red, int $green, int $blue, int $alpha = 0): false|null {}
657
658/**
659 * @return array<string, int>
660 * @refcount 1
661 */
662function imagecolorsforindex(GdImage $image, int $color): array {}
663
664function imagegammacorrect(GdImage $image, float $input_gamma, float $output_gamma): bool {}
665
666function imagesetpixel(GdImage $image, int $x, int $y, int $color): bool {}
667
668function imageline(GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color): bool {}
669
670function imagedashedline(GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color): bool {}
671
672function imagerectangle(GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color): bool {}
673
674function imagefilledrectangle(GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color): bool {}
675
676function imagearc(GdImage $image, int $center_x, int $center_y, int $width, int $height, int $start_angle, int $end_angle, int $color): bool {}
677
678function imageellipse(GdImage $image, int $center_x, int $center_y, int $width, int $height, int $color): bool {}
679
680function imagefilltoborder(GdImage $image, int $x, int $y, int $border_color, int $color): bool {}
681
682function imagefill(GdImage $image, int $x, int $y, int $color): bool {}
683
684function imagecolorstotal(GdImage $image): int {}
685
686function imagecolortransparent(GdImage $image, ?int $color = null): int {}
687
688function imageinterlace(GdImage $image, ?bool $enable = null): bool {}
689
690function imagepolygon(GdImage $image, array $points, int $num_points_or_color, ?int $color = null): bool {}
691
692function imageopenpolygon(GdImage $image, array $points, int $num_points_or_color, ?int $color = null): bool {}
693
694function imagefilledpolygon(GdImage $image, array $points, int $num_points_or_color, ?int $color = null): bool {}
695
696function imagefontwidth(GdFont|int $font): int {}
697
698function imagefontheight(GdFont|int $font): int {}
699
700function imagechar(GdImage $image, GdFont|int $font, int $x, int $y, string $char, int $color): bool {}
701
702function imagecharup(GdImage $image, GdFont|int $font, int $x, int $y, string $char, int $color): bool {}
703
704function imagestring(GdImage $image, GdFont|int $font, int $x, int $y, string $string, int $color): bool {}
705
706function imagestringup(GdImage $image, GdFont|int $font, int $x, int $y, string $string, int $color): bool {}
707
708function imagecopy(GdImage $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height): bool {}
709
710function imagecopymerge(GdImage $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height, int $pct): bool {}
711
712function imagecopymergegray(GdImage $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height, int $pct): bool {}
713
714function imagecopyresized(GdImage $dst_image, GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_width, int $dst_height, int $src_width, int $src_height): bool {}
715
716function imagesx(GdImage $image): int {}
717
718function imagesy(GdImage $image): int {}
719
720function imagesetclip(GdImage $image, int $x1, int $y1, int $x2, int $y2): bool {}
721
722/**
723 * @return array<int, int>
724 * @refcount 1
725 */
726function imagegetclip(GdImage $image): array {}
727
728#ifdef HAVE_GD_FREETYPE
729/**
730 * @return array<int, int>|false
731 * @refcount 1
732 */
733function imageftbbox(float $size, float $angle, string $font_filename, string $string, array $options = []): array|false {}
734
735/**
736 * @return array<int, int>|false
737 * @refcount 1
738 */
739function imagefttext(GdImage $image, float $size, float $angle, int $x, int $y, int $color, string $font_filename, string $text, array $options = []): array|false {}
740
741/**
742 * @return array<int, int>|false
743 * @alias imageftbbox
744 */
745function imagettfbbox(float $size, float $angle, string $font_filename, string $string, array $options = []): array|false {}
746
747/**
748 * @return array<int, int>|false
749 * @alias imagefttext
750 */
751function imagettftext(GdImage $image, float $size, float $angle, int $x, int $y, int $color, string $font_filename, string $text, array $options = []): array|false {}
752#endif
753
754/** @param array|int|float|bool $args */
755function imagefilter(GdImage $image, int $filter, ...$args): bool {}
756
757function imageconvolution(GdImage $image, array $matrix, float $divisor, float $offset): bool {}
758
759function imageflip(GdImage $image, int $mode): bool {}
760
761function imageantialias(GdImage $image, bool $enable): bool {}
762
763/** @refcount 1 */
764function imagecrop(GdImage $image, array $rectangle): GdImage|false {}
765
766/** @refcount 1 */
767function imagecropauto(GdImage $image, int $mode = IMG_CROP_DEFAULT, float $threshold = 0.5, int $color = -1): GdImage|false {}
768
769/** @refcount 1 */
770function imagescale(GdImage $image, int $width, int $height = -1, int $mode = IMG_BILINEAR_FIXED): GdImage|false {}
771
772/** @refcount 1 */
773function imageaffine(GdImage $image, array $affine, ?array $clip = null): GdImage|false {}
774
775/**
776 * @param array|float $options
777 * @refcount 1
778 * @return array<int, float>|false
779 */
780function imageaffinematrixget(int $type, $options): array|false {}
781
782/**
783 * @return array<int, float>|false
784 * @refcount 1
785 */
786function imageaffinematrixconcat(array $matrix1, array $matrix2): array|false {}
787
788function imagegetinterpolation(GdImage $image): int {}
789
790function imagesetinterpolation(GdImage $image, int $method = IMG_BILINEAR_FIXED): bool {}
791
792/**
793 * @return array<int, int>|true
794 * @refcount 1
795 */
796function imageresolution(GdImage $image, ?int $resolution_x = null, ?int $resolution_y = null): array|bool {}
797