<?php /** * overlay_image * * Overlay a transparent image on top of another image. * * @version 0.2 * @author Contributors at eXorithm * @link /algorithm/view/overlay_image Listing at eXorithm * @link /algorithm/history/overlay_image History at eXorithm * @license /home/show/license * * @param resource $base (GD image) * @param resource $image (GD image) * @return mixed */ function overlay_image($base=null,$image=null) { $h = imagesy($image); $w = imagesx($image); imagealphablending($base, true); imagesavealpha($base, true); imagecopy($base, $image, 0, 0, 0, 0, $w, $h); return $base; } ?>