Войти через VK Войти через FB Войти через Google Войти через Яндекс
Поиск по сайту
// File
$filename = 'phplogo.png';
// Content type
header('Content-type: image/png');
// Load
$im = imagecreatefrompng($filename);
// Flip it vertically
imageflip($im, IMG_FLIP_VERTICAL);
// Output
imagejpeg($im);
imagedestroy($im);
Результатом выполнения данного примера будет что-то подобное:

Пример #2 Flips the image horizontally
This example uses the IMG_FLIP_HORIZONTAL constant.
// File
$filename = 'phplogo.png';
// Content type
header('Content-type: image/png');
// Load
$im = imagecreatefrompng($filename);
// Flip it horizontally
imageflip($im, IMG_FLIP_HORIZONTAL);
// Output
imagejpeg($im);
imagedestroy($im);
Результатом выполнения данного примера будет что-то подобное:

Примечания
Замечание: Эта функция доступна только в случае, если PHP был скомпилирован со встроенной библиотекой GD.

User Contributed Notes
There are no user contributed notes for this page.