Install a php script in PHP-FPM & Caddy via Docker

Install docker Either regular docker install or rootless. Create a new directory Create a new directory where you will store your Docker Compose file and PHP/html etc files. For example, you can create a directory called “phpapp” in your home directory: write a docker compose file paste the below code in a new file called… Continue reading Install a php script in PHP-FPM & Caddy via Docker

PHP Image Magick Drop Shadow

Want to add a simple drop shadow on any image? well here’s how to do it on the fly via PHP and Image Magick. < ?php $img = new Imagick(‘images/image.jpg’); $img->setImageFormat(‘png’); $shadowed = $img->clone(); $drop_shadow = $img->clone(); $drop_shadow->setImageBackgroundColor( new ImagickPixel( ‘black’ ) ); $drop_shadow->shadowImage( 80, 3, 5, 5 ); $drop_shadow->compositeImage( $img, Imagick::COMPOSITE_OVER, 0, 0 );… Continue reading PHP Image Magick Drop Shadow

Exit mobile version