#!/bin/tcsh # Shell script to put faces into a Web page - RWCox # Usage: distface # -- to be run inside the AFNI/src/faces directory echo "===== Making afni_faces.html =====" echo 'AFNI User Images' > afni_faces.html echo '

AFNI User Images

' >> afni_faces.html echo '

Contributed by each user

' >> afni_faces.html echo 'To contribute your personal image, send a JPEG (.jpg) file' >> afni_faces.html echo 'no larger than 128x128 to' >> afni_faces.html echo 'rwcox@nih.gov.
' >> afni_faces.html echo 'These images are also shown randomly in the AFNI splash screen.' >> afni_faces.html # echo '

[GIF Animation of all faces]' >> afni_faces.html echo '

[Scrolling Animation Page]' >> afni_faces.html echo '


' >> afni_faces.html echo '
' >> afni_faces.html echo '
' >> afni_faces.html echo '
' >> afni_faces.html echo '
' >> afni_faces.html echo '
' >> afni_faces.html echo '' >> afni_faces.html echo '' >> afni_faces.html set nn = 0 foreach face ( face_*.jpg ) if( $nn == 0 ) then echo '' >> afni_faces.html echo '' >> afni_faces.html endif if( "$face" == "face_rwcox2.jpg" ) continue ; if( "$face" == "face_rwcox3.jpg" ) continue ; echo '' >> afni_faces.html @ nn = ($nn + 1) % 7 end echo '
' >> afni_faces.html echo '
' >> afni_faces.html echo '
' >> afni_faces.html echo '
' >> afni_faces.html echo '
' >> afni_faces.html echo '
' >> afni_faces.html echo '
This page generated on' >> afni_faces.html date >> afni_faces.html echo '

' >> afni_faces.html echo '' >> afni_faces.html echo 'AFNI main page' >> afni_faces.html echo '

' >> afni_faces.html #### Make face animation # echo "===== Making face animation =====" # # foreach face ( face_*.jpg ) # set z = `basename $face .jpg` # djpeg $face | pnmpad -height 128 -width 128 -black > ${z}.ppm # end # # set zz = ( face_*.ppm ) # set nz = $#zz # set ii = 1 # set qq = 1000 # while( $ii < $nz ) # ppmquant 127 $zz[$ii] | ppmtogif > ${qq}.gif # @ qq = $qq + 1 # @ jj = $ii + 1 # pamarith -mean $zz[$ii] $zz[$jj] | pnmsmooth | ppmquant 127 | ppmtogif > ${qq}.gif # @ qq = $qq + 1 # set ii = $jj # end # ppmquant 127 $zz[$nz] | ppmtogif > ${qq}.gif # @ qq = $qq + 1 # pamarith -mean $zz[$nz] $zz[1] | pnmsmooth | ppmquant 127 | ppmtogif > ${qq}.gif # whirlgif -loop -time 19 -o afni_faces.gif [1-9]*.gif # /bin/rm -f face_*.ppm [1-9]*.gif #### Make scrolling page echo "===== Making scrolling page =====" set zz = ( face_*.jpg ) set nz = $#zz set ii = 0 echo '