#!/bin/tcsh -ef
mkdir gooA
mkdir gooB
echo "<html><head><title>The effect of variable quality settings on jpg tile levels for several random images</title></head><body>" > gooq.html
echo "<h1>The effect of variable %quality settings for jpg tile compression</h1>" >> gooq.html
foreach f (/san/sanvol1/scratch/visiGene/jpgTest/*.jp2)
  set rname = $f:t:r
  set x = ( `jp2Info $f` )
  set w = $x[3]
  set h = $x[5]
  echo "$f $w $h - now doing tiles test for variable quality" 
  echo "$f $w $h - now doing tiles test for variable quality  <br>" >> gooq.html
  jp2ToJpgTiles $f gooA -quality 95
  echo "<A href=http://hgwdev.cse.ucsc.edu/bigImage.html?url=http://hgwdev.cse.ucsc.edu/visiGene/full/inSitu/Mouse/jax/gooA/${rname}/${rname}&w=${w}&h=${h}> A </a>" >> gooq.html
  jp2ToJpgTiles $f gooB -variable 50 60 70 80 85
  echo "&nbsp;" >> gooq.html
  echo "<A href=http://hgwdev.cse.ucsc.edu/bigImage.html?url=http://hgwdev.cse.ucsc.edu/visiGene/full/inSitu/Mouse/jax/gooB/${rname}/${rname}&w=${w}&h=${h}> B </a>" >> gooq.html
  echo "<br>" >> gooq.html
  echo "<br>" >> gooq.html
end
echo "</body></html>" >> gooq.html

