Connecting Tech Pros Worldwide Forums | Help | Site Map

Combining two images

alistair.calder@gmail.com
Guest
 
Posts: n/a
#1: Oct 2 '05
I use a PHP script as a random image selector. I would like to add a
small 'footer' image to the bottom of each one at runtime. I change
the pool of images regularly so it is not something I want to do in
photoshop, rather, I would like to find a way to do this in PHP.

Is there a way to attach two images together in this way so that they
are rendered as a single image?

+--------------+
| Main Image |
+ -------------+
| Footer Image |
+--------------+

Thanks,
Alistair


Domestos
Guest
 
Posts: n/a
#2: Oct 2 '05

re: Combining two images


Use the image commands... got php manual and type image as a search and you
will find them all !

--
Thanks,
Andrew Makinson
www.buy-a-pixel.com





<alistair.calder@gmail.com> wrote in message
news:1128214286.998338.270520@f14g2000cwb.googlegr oups.com...[color=blue]
>I use a PHP script as a random image selector. I would like to add a
> small 'footer' image to the bottom of eac[/color]

h one at runtime. I change[color=blue]
> the pool of images regularly so it is not something I want to do in
> photoshop, rather, I would like to find a way to do this in PHP.
>
> Is there a way to attach two images together in this way so that they
> are rendered as a single image?
>
> +--------------+
> | Main Image |
> + -------------+
> | Footer Image |
> +--------------+
>
> Thanks,
> Alistair
>[/color]


Tim Roberts
Guest
 
Posts: n/a
#3: Oct 2 '05

re: Combining two images


alistair.calder@gmail.com wrote:
[color=blue]
>I use a PHP script as a random image selector. I would like to add a
>small 'footer' image to the bottom of each one at runtime. I change
>the pool of images regularly so it is not something I want to do in
>photoshop, rather, I would like to find a way to do this in PHP.
>
>Is there a way to attach two images together in this way so that they
>are rendered as a single image?
>
>+--------------+
>| Main Image |
>+ -------------+
>| Footer Image |
>+--------------+[/color]

This requires that you actually modify the JPEG image itself. To do that,
you have to uncompress the JPEGs, combine the images, and recompress it to
a JPEG.

There are command line or scripting solutions for this, but I don't think
you'll want to do it on the fly in PHP.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
Closed Thread