Reputation:
I have an image (think a photograph of a tree) and I want to put a 'play' arrow on it. I have 1000s of images to do this too. Is there a better way to do this than with imagemagick?
Upvotes: 1
Views: 234
Reputation: 5371
If you can use a "plugin" instead of writing your own codes. I'll suggest Asido, it can use imagemagick, gd, etc. http://sourceforge.net/projects/asido/
Upvotes: 0
Reputation: 1335
May be this code helps you... in this i got a border around the images
$water_mark = imagecreatefrompng('your/image/path.png');
$water_mark_width = imagesx($water_mark);
$water_mark_height = imagesy($water_mark);
$image = imagecreatetruecolor($water_mark_width, $water_mark_height);
$image = imagecreatefromjpeg('image_path.jpg');
$size = getimagesize('image_path.jpg');
$dest_x = $size[0] - $water_mark_width - 0;
$dest_y = $size[1] - $water_mark_height - 0;
imagecopymerge($image, $water_mark, $dest_x, $dest_y, 0,0, $watermark_width, $watermark_height, 100);
Upvotes: 1