imagecopyresampled
Function • Return type changed in PHP 8.5
Copy and resize part of an image with resampling.
imagecopyresampled Function synopsis
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
): true
Parameters
$dst_image
TypeGdImage
Destination image resource.
$src_image
TypeGdImage
Source image resource.
$dst_x
Typeint
x-coordinate of destination point.
$dst_y
Typeint
y-coordinate of destination point.
$src_x
Typeint
x-coordinate of source point.
$src_y
Typeint
y-coordinate of source point.
$dst_width
Typeint
Destination width.
$dst_height
Typeint
Destination height.
$src_width
Typeint
Source width.
$src_height
Typeint
Source height.
Return value
Typetrue
Returns true on success, false on failure
Changes to the imagecopyresampled Function
PHP 8.5
- Return type changed:
booltotrue
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
+ ): true PHP 8.0
- Return type added:
bool - Parameter name of parameter #1 changed:
$dst_imto$dst_image - Parameter type added for parameter #1 (
$dst_image):GdImage - Parameter name of parameter #2 changed:
$src_imto$src_image - Parameter type added for parameter #2 (
$src_image):GdImage - Parameter type added for parameter #3 (
$dst_x):int - Parameter type added for parameter #4 (
$dst_y):int - Parameter type added for parameter #5 (
$src_x):int - Parameter type added for parameter #6 (
$src_y):int - Parameter name of parameter #7 changed:
$dst_wto$dst_width - Parameter type added for parameter #7 (
$dst_width):int - Parameter name of parameter #8 changed:
$dst_hto$dst_height - Parameter type added for parameter #8 (
$dst_height):int - Parameter name of parameter #9 changed:
$src_wto$src_width - Parameter type added for parameter #9 (
$src_width):int - Parameter name of parameter #10 changed:
$src_hto$src_height - Parameter type added for parameter #10 (
$src_height):int
imagecopyresampled(
- $dst_im,
+ GdImage $dst_image,
- $src_im,
+ GdImage $src_image,
- $dst_x,
+ int $dst_x,
- $dst_y,
+ int $dst_y,
- $src_x,
+ int $src_x,
- $src_y,
+ int $src_y,
- $dst_w,
+ int $dst_width,
- $dst_h,
+ int $dst_height,
- $src_w,
+ int $src_width,
- $src_h
+ int $src_height
- )
+ ): bool imagecopyresampled Function Availability
imagecopyresampled Function Availability| PHP Version | Availability |
|---|---|
| PHP 8.6Future Release | Yes |
| PHP 8.5Upcoming Release | Yes |
| PHP 8.4Supported (Latest) | Yes |
| PHP 8.3Supported | Yes |
| PHP 8.2Security-Fixes Only | Yes |
| PHP 8.1Security-Fixes Only | Yes |
| PHP 8.0Unsupported | Yes |
| PHP 7.4Unsupported | Yes |
| PHP 7.3Unsupported | Yes |
| PHP 7.2Unsupported | Yes |
| PHP 7.1Unsupported | Yes |
| PHP 7.0Unsupported | Yes |
| PHP 5.6Unsupported | Yes |
| PHP 5.5Unsupported | Yes |
| PHP 5.4Unsupported | Yes |
| PHP 5.3Unsupported | Yes |