PHP » GoLang |
login |
register |
about
|
GoLang imagecopyresampled
request it (343)
GoLang replacement for PHP's imagecopyresampled
[edit | history]
imagecopyresampled(PHP 4 >= 4.0.6, PHP 5, PHP 7) imagecopyresampled — Copy and resize part of an image with resampling Description
bool imagecopyresampled
( resource
$dst_image
, resource $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
)imagecopyresampled() copies a rectangular portion of one image to another image, smoothly interpolating pixel values so that, in particular, reducing the size of an image still retains a great deal of clarity.
In other words, imagecopyresampled() will take a
rectangular area from
If the source and destination coordinates and width and heights
differ, appropriate stretching or shrinking of the image fragment
will be performed. The coordinates refer to the upper left
corner. This function can be used to copy regions within the
same image (if Parameters
Return Values
Returns Examples
Example #1 Simple example This example will resample an image to half its original size.
<?php The above example will output something similar to:
Example #2 Resampling an image proportionally This example will display an image with the maximum width, or height, of 200 pixels.
<?php The above example will output something similar to: Notes
See Alsoimagecopyresized() - Copy and resize part of an image |
more
Recently updated
more
Most requested
more
Last requests
|