View Single Post
Old 08-06-2004, 02:08 PM   #7 (permalink)
littleFella
Senior Member
 
littleFella's Avatar
 
Join Date: 06-20-04
Location: Ontario
Posts: 1,758
iTrader: 0 / 0%
Latest Blog:
None

littleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to beholdlittleFella is a splendid one to behold
gotta go for a bit, so for now just high level code for you.

Let's define some variables. I like using "stamp" as the word for source image.


(int) SW - stamp_width
(int) SH - stamp_height

(int) PW - width of destination picture
(int) PH - height of destination picture


dest_x = PW - SW -5
dest_y = PH - SH - 5

Using dest_x and dest_y will place your stamp in bottom right corner of the destination graphics, such that there will be a 5 pixel margin between the right edge of the destination picture and the right edge of the stamp. Similar effect will occur for the bottom edges of the dest. picture and stamp.

Of course, kep in mind that you may ned to resize the stamp.

As for opacity, the last parameter of the function mentioned above is actually opacity value of the stamp image.



$opacity = 25;
ImageCopyMerge ($img_des, $img_src, 0, 0, 0, 0, $size[0], $size[1], $opacity);

Will copy two images of the same sizez onto each other with 25% opacity applied.

These are the meanings and function of individual parameters, with positional ordering.


1 = destination image
2 = source image
3 = x co-ordinate of the destination image to copy to
4 = y co-ordinate of the destination image to copy to
5 = x co-ordinate of the source image to start the copy from
6 = y co-ordinate of the source image to start the copy from
7 = how much of the source image in width to copy
8 = how much of the source image in height to copy
9 = opacity value

<edit: mistype>
littleFella is offline   Reply With Quote