javascript - Superimpose Images with PHP -
i searching way overlay image on existing image.
e.g:
+
i have found great example on here: png overlay using 1 single image element. have two problems these.
first of all, don't want dimensions equal each other. e.g (215*215 on 215*215). because users have ability choose want put image. (top, left, bottom, top-right) 8 directions.
the second problem in example, 2 images allowed overlay. users (again) have ability put multiple images on top of it.
i have little knowledge of javascript , php, great if guys (and girls) me out.
sincerely,
you can using gd library. there function "merge" images called imagecopymerge
.
here simple example how merge images:
<?php header('content-type: image/jpeg'); $bg = imagecreatefromjpeg('background.jpg'); $img = imagecreatefromjpeg('image.jpg'); imagecopymerge($bg, $img, 0, 0, 0, 0, imagesx($bg), imagesy($bg), 75); imagejpeg($bg, null, 100); ?>
Comments
Post a Comment