Image compositing
| From: | David Shugarts | Date: | Tue, 18 Nov 2003 15:29:26 +0000 |
| Subject: | Image compositing | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-31612@lists.php.net to get a copy of this message | ||
This isn't exactly a database question, but I would guess that it pertains
to a lot of people's database projects. Has anyone been successful with
image compositing of the following general nature?
I have a set of many dozens of images which depict various combinations of
shapes/styles for products, each of which can be obtained in dozens of
colors. I want to be able to keep the shapes in a database, and colorize
them with PHP on the fly.
Take, for instance, a zebra-stripe pattern that can be shown in white/black
or green/yellow, or any permutation using dozens of colors. The object in
question is an irregular shape and I can generate the two basic images (the
stripes and the inverse of the stripes) with transparent backgrounds in PNG.
If overlaid by the browser, BTW, they work fine.
However, what I want to do is take the stripes image and colorize it, the
inverse-stripes image and colorize it, then composite the two images,
retaining the transparent background.
I have looked through all the GD and PHP image functions and although they
are promising, they don't seem up to this task. I looked at ImageMagick, but
I am not sure I can install this, as I am on a hosted server, and I cannot
tell whether this task is specifically covered by ImageMagick.
Any and all help would be greatly appreciated.
--Dave Shugarts