|
imagecopyresampledCopy and resize part of an image with resampling Beschreibung
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 Parameter-Liste
Rückgabewerte
Gibt bei Erfolg Beispiele
Beispiel #1 Simple example This example will resample an image to half its original size.
<?phpDas oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:
Beispiel #2 Resampling an image proportionally This example will display an image with the maximum width, or height, of 200 pixels.
<?phpDas oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:
Anmerkungen
Siehe auchimagecopyresized |