Answer the question
In order to leave comments, you need to log in
How to make a shadow for an image in PHP?
Hello everyone !!=) People there is such a picture
Make like this
I managed to do like this
But how to add shadows to these pictures ???
I am attaching the code I wrote.
$dest = imagecreatefromjpeg('result.jpg');
$src = imagecreatefromjpeg('thumb_l_28550.jpg');
$resultImg='res.jpg';
imagecopymerge($dest, $src, 20, 190, 20, 190, 150, 170, 100);
imagecopymerge($dest, $src, 178, 127, 178, 127, 150, 300, 100);
imagecopymerge($dest, $src, 336, 23, 336, 23, 150, 500, 100);
imagecopymerge($dest, $src, 495, 127, 495, 127, 150, 300, 100);
imagecopymerge($dest, $src, 653, 190, 653, 190, 150, 170, 100);
header('Content-Type: image/jpg');
imagejpeg($dest,$resultImg);
Answer the question
In order to leave comments, you need to log in
I suppose to cut the main image into the number of images you need, save as separate images and separately add shadows, then create an empty image of the desired size and place all the necessary images in it. And all this using php.
Shadows are made with CSS. Here's a utility to make things easier: link .
In general, no way.
1. Make the template ready with a bottom layer
2. Use external editors
https
://stackoverflow.com/questions/7288173/how-ca...
on php in any way dynamically.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question