| Richards Center at Yale University |
| RC Home | Search | Table of Contents | General Information |
Last Modified: Wednesday, 01-Mar-2006 16:44:12 EST
Listing of this directory
$sdir/annotate project_nn.ann project.jpg project.f.jpg
composite -compose Plus temp1.jpg $lbl/dvdmask.jpg temp2.jpg
convert -density 150 -units PixelsPerInch temp2.jpg project_nn.pdf
Labels are produced using ImageMagick(IM). IM's coordinates are in pixels, with (0,0) in the UL corner. The steps are:
Scripts are in /srv/local/backup/scripts; Images and annotation templates are in /srv/local/backup/labels.
setenv scr /srv/local/backup/scripts
setenv lbl /srv/local/backup/labels
cd $lbl
cp diffpattern2.jpg diffpattern2-733px.jpg
mogrify -scale 733x733 diffpattern2-733px.jpg
Create the DVD mask file using the script dvdmask:
$scr/dvdmask $lbl/dvdmask.jpg
Combine the mask with the background image, creating a working image in
the CWD. (This step is not really necessary; after annotations are added
(next step), the mask will be applied again. But this is useful to help
determine where to place the annotations.)
composite -compose Plus $lbl/diffpattern2-733px.jpg \
$lbl/dvdmask.jpg maskedimage.jpg
$scr/annotate $lbl/xray-fixed-01.ann maskedimage.jpg fixed-ann.jpg
Next, a user-supplied annotation file is applied to supply additional
annotations, based on $lbl/xray-user-01.ann.
cp $lbl/xray-user-01.ann myprojectbase.ann
vi myprojectbase.ann
$scr/annotate myprojectbase.ann fixed-ann.jpg myprojectlabel.jpg
composite -compose Plus myprojectlabel.jpg \
$lbl/dvdmask.jpg final.jpg
convert -density 150 -units PixelsPerInch final.jpg final.pdf
final.pdf can now be ftp'd to elijah using binary mode.
#fields are separated by ^
#coords^size ^color^font ^Annotation text
# (PTs)
300,100^20 ^blue^ @times.ttf^Yale University
240,120^20 ^blue^ @times.ttf^Center for Structural Biology
230,140^18 ^blue^ @Times.ttf^x-ray crystallography data archive
#!/bin/sh
# usage: dvdmask targetfile.jpg
# create a .jpg file with a white background, and a black disc denoting
# the printable area of a DVD (or CD). For the Rimage, the label should be
# 733x733 pixels (122mm-sq). The printable area has diameter 696 pixels.
# There is an unprintable hub in the center with a 214-pixel diameter.
maskfile=$1
# create the file, with the 696-pixel diameter black disc inside it
convert -size 733x733 xc:white -fill black \
-draw 'circle 366,366 18,366' $maskfile
# overlay the 214-pixel diameter white disc in the center
mogrify -fill white -draw 'circle 366,366 259,366' $maskfile
#!/bin/perl
# usage:
# annotate annotation_file template.jpg annotated.jpg
my $afile = shift(@ARGV);
my $tjpg = shift(@ARGV);
my $ajpg = shift(@ARGV);
# copy $tjpg to $ajpg -- operations will be applied to $ajpg
`cp $tjpg $ajpg`;
# For annotation, use commands of the form:
# mogrify -pointsize 14 -fill blue -font Times \
# -draw 'text 50,360 "middle of disc"' $ajpg
Last Modified: Wednesday, 01-Mar-2006 16:44:12 EST
| RC Home | Search | Table of Contents | General Information |
|
Richards Center (www.rc.yale.edu) at
Yale University (www.yale.edu)
Contact: webmaster_at_ben^rc^yale^edu |