Skip to content

Instantly share code, notes, and snippets.

@gluschenko
Created May 16, 2016 17:38
Show Gist options
  • Save gluschenko/b384c7dd3b010bb113a6f832d2b288d6 to your computer and use it in GitHub Desktop.
Save gluschenko/b384c7dd3b010bb113a6f832d2b288d6 to your computer and use it in GitHub Desktop.
<?php
$image = imagecreatetruecolor(180,40);
// Пишет текст и применяет размытие к изображению
imagestring($image, 5, 10, 8, 'Gaussian Blur Text', 0x00ff00);
$gaussian = array(array(1.0, 2.0, 1.0), array(2.0, 4.0, 2.0), array(1.0, 2.0, 1.0));
imageconvolution($image, $gaussian, 16, 0);
// Переписывает текст для сравнения
imagestring($image, 5, 10, 18, 'Gaussian Blur Text', 0x00ff00);
header('Content-Type: image/png');
imagepng($image, null, 9);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment