Re: Combining two images
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: Combining two images

From: Tim Roberts <timr@probo.com>
Date: Sun Oct 02 2005 - 08:10:41 CEST

alistair.calder@gmail.com wrote:

>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 |
>+--------------+

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.
Received on Tue Oct 18 02:30:22 2005