From: Axel Kohlmeyer (
Date: Thu Apr 24 2008 - 17:29:10 CDT

On Thu, 24 Apr 2008, Anthony Ivetac wrote:

AI> Thanks Axel. This sounds like a good idea, but I am not sure how I would
AI> superimpose a single snapshot (of just the text labels) onto the frames of
AI> the Tachyon-rendered time-bar and protein - i.e. just superimposing the text
AI> and not the plain white background. Is there a command for ImageMagick that
AI> will do this?

i don't know ImageMagick well, but i'd do it with netpbm. those
are all commandline tools. the movie makes will already have converted
the .tga snapshots to .ppm format.
you can take the snapshot with the labels. load it into an image
editor. remove everything that you don't want to see and paint it
with a color that is not contained in the rest (e.g. regular green).
then you change the image that all non-green stuff is white and
all green becomes black and save that as well (and convert to pgm)

then you can use pamcomp with the -alpha flag to merge the label
image using the black/white image as alpha map with each rendered
image into a new composite image and then compress those composites.

using netpbm takes a little while to get it right, but once you
get the hang of it, it is fun and also gives you excellent
practice in "basic unix plumbing".


AI> Cheers!
AI> On Thu, Apr 24, 2008 at 12:45 PM, Axel Kohlmeyer <
AI>> wrote:
AI> > in principle you can do this for example with some unix shell
AI> > script and tools like ImageMagick, or netpbm. you just create
AI> > an image with the labels and then superimpose it on the rendered
AI> > tachyon images. just click on 'keep intermediate files'
AI> > and postprocess them and then rerun the compression manually.
AI> >

Axel Kohlmeyer
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
If you make something idiot-proof, the universe creates a better idiot.