Server-side image merge?
February 21, 2008 12:26 PM   Subscribe

What are my options for including an auto-merged image file in the context of a website?

Here's a quick description of the functionality I'm after:

A generic page layout which incorporates some corporate branding is assembled. The layout is then deployed over several domains and subdomains.

The key branding element is a corporate logo in the upper right and is used as a 'home' navigation element, just as Matt uses the Metafilter logos on these sites.

The logo, however, should render on demand and then remain as a server-side cached element, and the rendering should add either the fully-qualified domain for the specific site - or - a titling element which can be defined by an administrator.

In summary, the textual elements should be 'stamped' onto the logo image. Ideally the textual elements would appear to be a part of the design of the logo and adhere to professional type-design-and-display standards with arbitrary font definition, reasonable kerning, antialiasing, consistent baseline control, and so forth.

Flash-based solutions are acceptable, probably. Server-side solutions that rely on roll-your-own code to call ImageMagick are probably out; an off-the-shelf script that uses ImageMagick might be acceptable (I will need to verify that ImageMagick is available within the hosted environment). Java-based and Quicktime solutions are not acceptable.
posted by mwhybark to Media & Arts (1 answer total)
 
Even though you say "roll-your-own code to call ImageMagick are probably out", here's are the calls to do that anyway, just incase anyone else is interested...

Let's say you three images: base.png, text.png, and border.png. You want to place these on top of each other to produce one image as the logo. Here are the ImageMagick commands to do this:

composite -dissolve 100 base.png text.png -matte temp.png
composite -dissolve 100 temp.png border.png -matte logo.png

(There is probably a way to do these two operations in one command, but this is the path of least resistance).

You could have ImageMagic produce the text for you, but it's not very pretty (although I'm sure you could tweak it):
convert -background black -fill white label:"Your Text Here" text.png
Then use the composite commands above as usual...
posted by bumper314 at 5:10 PM on February 21, 2008


« Older i can has real opinion?   |   Shrimp Recipe Me Newer »
This thread is closed to new comments.