Adding Smaller Images to a Larger Image

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
thomas777neo
Forum Contributor
Posts: 214
Joined: Mon Mar 10, 2003 6:12 am
Location: Johannesburg,South Africa

Adding Smaller Images to a Larger Image

Post by thomas777neo »

Hi All

I have created a script that simply take an existing image

Code: Select all

$im = imagecreatefromjpeg("superdupermappyland.jpg");
and draws rectangles on the image according to x,y's via

Code: Select all

imagefilledrectangle($im,$x-2,$y-2,$x+2,$y+2,$red);
.

What I need to to is, instead of drawing little rectangles I need to draw another image on the existing image (i.e icon.jpg).

If anyone could please assist, It would be greatly appreciated.
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

ImageCopyMerge

Post by phpScott »

try looking at [php_man]ImageCopyMerge[/php_man] for what you are looking for.
User avatar
thomas777neo
Forum Contributor
Posts: 214
Joined: Mon Mar 10, 2003 6:12 am
Location: Johannesburg,South Africa

Resolved

Post by thomas777neo »

Thanks, that was pretty easy...
:D
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

no problem

Post by phpScott »

I have done a couple of sites now that needed graphical manipulation.
Not bad for a guy that needs a pencil, ruler and a big earaser to draw a stick man. :lol:
Post Reply