What is a "Cached image"?

Server-side image merge?

  • 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.

  • Answer:

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

mwhybark at Ask.Metafilter.Com Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.