removed this directory and its contents. The papers we used to keep here

2007-06-06  Sven Neumann  <sven@gimp.org>

	* docs/papers: removed this directory and its contents. The papers
	we used to keep here are only of historical value.

svn path=/trunk/; revision=22720
This commit is contained in:
Sven Neumann 2007-06-06 09:45:09 +00:00 committed by Sven Neumann
parent 63a6f34bfd
commit 0b92d2436c
7 changed files with 5 additions and 8766 deletions

View File

@ -1,3 +1,8 @@
2007-06-06 Sven Neumann <sven@gimp.org>
* docs/papers: removed this directory and its contents. The papers
we used to keep here are only of historical value.
2007-06-06 Michael Natterer <mitch@gimp.org>
* libgimpthumb/Makefile.am

View File

@ -1,870 +0,0 @@
%!PS-Adobe
%%BoundingBox: 80 360 525 720
%%BeginProlog
/wpdict 300 dict def
wpdict begin
/d{bind def}bind def/l{load def}d/ec{exec def}d/cp/closepath l/cup/currentpoint l/cs/currentscreen l
/cv/curveto l/drx{dtransform round x round x}d/f/eofill l/g/setgray l/gr/grestore l
/gs/gsave l/ife{ifelse}d/ix/index l/li/lineto l/lc/setlinecap l
/lj/setlinejoin l/m/moveto l/mx/matrix l/mcm{mx currentmatrix}d/sm/setmatrix l
/np/newpath l/p/pop l/re/rotate l/rh/readhexstring l/rl/rlineto l/rm/rmoveto l/rs/restore l
/setfl{dup 1 le{p 1 setflat}{setflat}ife}def/languagelevel where{p languagelevel}{1}ife
2 lt{/sf{bzcnt 70 div setfl}d/fpath{bzcnt 4 div setflat}d}{/sf{}d/fpath{}d}ife
/cf currentflat def/s{fpath flattenpath stroke}d/sc/scale l
/sd/setdash l/ss/setscreen l/sv/save l/tr/translate l
/w/setlinewidth l/x/exch l/xd{x def}d/c{3{255 div 3 1 roll}repeat setrgbcolor}d
/bF false def/bF2 false def/bf 0 def/ds{gs 1 lc s gr}d/gd{255 div g}d
/h{0 rm}d
/lp{px li}d/mp{px m}d/nb 50 string def/osv 0 def/icl/initclip l/pf{gs f gr}def
/pff{gs fill gr}def/pl{{px li}repeat}d/ps{gs s gr}def/plen 0 def/pwid 0 def
/px{transform .25 sub round .25 add x .25 sub round .25 add x itransform}d
/pxd{drx idtransform}d/rlp{pxd rl}d/rmp{pxd rm}d/_g{g}d/_lr{rlp}d/_s{s}d
/_w{w}d/_m{mp}d/_rmxy{rmp}d/bzcnt 0 def/bzct{/bzcnt xd}def
/bzcl{/bzcnt 0 def cf setflat}def/rF false def/sF false def/pth 0 def/ptw 0 def/pths 0 def/ptws 0 def/PColor 0 def
/instpat 0 def/cm 0 def/slan 0 def/hscl 0 def/psz 0 def/xres 0 def/yres 0 def/pstr 0 def/lutb 0 def
/rot 0 def/mir 0 def/HTd 0 def/WDd 0 def/ury 0 def/llx 0 def/lly 0 def/exstr 0 def/HTs 0 def/WDs 0 def
/Hs 0 def/Ws 0 def/imc 0 def/Bdep 0 def/clu 0 def/curx 0 def/cury 0 def/Sx 0 def/Sy 0 def/xpos 0 def
/ypos 0 def/lw 0 def/DUy 0 def/DUx 0 def/Ux 0 def/Uy 0 def/cml 0 def
/cp3{3 copy}d/cp4{4 copy}d/cp6{6 copy}d/aosh{cp3 -4 -4 rm gs ashow gr
cp3 4 0 rm gs ashow gr cp3 4 0 rm gs ashow gr cp3 0 4 rm gs ashow gr
cp3 0 4 rm gs ashow gr cp3 -4 0 rm gs ashow gr cp3 -4 0 rm gs ashow gr
cp3 0 -4 rm gs ashow gr currentrgbcolor 6 3 roll 1 g 4 0 rm ashow setrgbcolor}d
/wosh{cp4 -4 -4 rm gs widthshow gr
cp4 4 0 rm gs widthshow gr cp4 4 0 rm gs widthshow gr cp4 0 4 rm gs widthshow gr
cp4 0 4 rm gs widthshow gr cp4 -4 0 rm gs widthshow gr cp4 -4 0 rm gs widthshow gr
cp4 0 -4 rm gs widthshow gr currentrgbcolor 7 3 roll 1 g 4 0 rm widthshow setrgbcolor}d
/awosh{cp6 -4 -4 rm gs awidthshow gr
cp6 4 0 rm gs awidthshow gr cp6 4 0 rm gs awidthshow gr cp6 0 4 rm gs awidthshow gr
cp6 0 4 rm gs awidthshow gr cp6 -4 0 rm gs awidthshow gr cp6 -4 0 rm gs awidthshow gr
cp6 0 -4 rm gs awidthshow gr currentrgbcolor 9 3 roll 1 g 4 0 rm awidthshow setrgbcolor}d
/assh{sv gs psz 20 div dup neg rm 4 1 roll cp3 ashow 4 -1 roll gr cp3 sv x currentfont/PaintType known
{bf setfont}if 1 g ashow rs currentfont/PaintType known{currentfont mo setfont ashow}{aosh}ife cup 3 -1 roll rs m}d
/wssh{sv gs psz 20 div dup neg rm 5 1 roll cp4 widthshow gr cp4 sv currentfont/PaintType known{bf setfont}if
1 g 5 1 roll widthshow rs currentfont/PaintType known{currentfont mo setfont widthshow}{wosh}ife cup 3 -1 roll rs m}d
/awssh{sv gs psz 20 div dup neg rm 7 1 roll cp6 awidthshow gr cp6 sv x currentfont/PaintType known{bf setfont}if
1 g 7 1 roll awidthshow rs currentfont/PaintType known{currentfont mo setfont awidthshow}{awosh}ife cup 3 -1 roll rs m}d
/B{/bF true def sF not{/S/bsh l/bF2 true def}if}d
/b{/bF false def bF2{/S/show l/bF2 false def}if}d
/bd{sv}d/bp{sv .06 .06 sc 0 0 m}d/bsh{gs psz 30 div 0 rm dup show gr show}d
/clr{rF{6 3 roll p p p}{eq3{p p gd}{c}ife}ife}d/co{/pwid xd/plen xd
osv 1 eq{0 pwid tr -90 re}if osv 2 eq{pwid plen tr 180 re}if
osv 3 eq{plen 0 tr 90 re}if dup 1 eq{pwid 0 tr 90 re}if
dup 2 eq{pwid plen tr 180 re}if dup 3 eq{0 plen tr -90 re}if/osv xd}d
/cw{s initclip m 0 2 ix rl 0 rl 0 x neg rl clip np}d
/DU{cup/DUy xd/DUx xd}d/du{gs sv 12 w cup -24 add m DUx DUy -24 add li s rs
12 w cup -48 add m DUx DUy -48 add li s gr}d/ed{rs}d/ep{rs showpage 0 0 m}d
/eq3{3 copy 2 ix eq{eq{true}{false}ife}{p p false}ife}d
/ff{x rc x 3 div dup/psz xd scalefont dup/bf xd setfont}d
/ffs{/slan x 10 div def/hscl x 1000 div def/psz x 3 div def
[psz hscl mul 0 slan dup sin x cos div psz mul psz 0 0]
x rc x makefont dup/bf xd setfont}d/fr{72 0 rmtx defaultmatrix dtransform
/yres xd/xres xd xres dup mul yres dup mul add sqrt}d
/is{sv 4 1 roll dup/pstr x 7 add 8 idiv string def
3 1 roll tr dup 1 sc dup 1 1[5 -1 roll 0 0 1 0 0]{currentfile pstr rh p}
cml 0 eq{image}{false 3 colorimage}ife rs}d/cexp{exstr 0 lutb 3 copy 7 -1 roll
{get putinterval x 3 add x 3 copy}forall p p p p p}d/bwexp{dup 0 lutb 3 copy 7 -1 roll
{get put x 1 add x 3 copy}forall p p p p p}d/NOM 0 def/INX 1 def/INY 2 def
/p1x 0 def/p1y 0 def/p2x 0 def/p2y 0 def/p3x 0 def/p3y 0 def
/idef{/p3y xd/p3x xd/p2y xd/p2x xd/p1y xd/p1x xd
/rot xd/mir xd p3x p1x sub 1 add dup mul p1y p3y sub 1 add
dup mul add sqrt/HTd xd p2y p1y sub 1 add dup mul p2x p1x
sub 1 add dup mul add sqrt/WDd xd}def
/mirror{mir NOM eq{Ws Hs sc}{mir INX eq{Ws neg Hs sc}
{mir INY eq{Ws Hs neg sc}{Ws neg Hs neg sc}ife}ife}ife}def
/ic{sv 6 1 roll tr 2 ix 2 ix sc[3 ix 0 0 5 ix neg 0 7 ix]
2 1 roll true 3 1 roll imagemask rs}d/ieps{/ury xd/urx xd/lly xd/llx xd idef
ury lly sub/HTs xd urx llx sub/WDs xd
WDd WDs div/Ws xd HTd HTs div/Hs xd
p3x p3y tr rot re mirror llx neg lly neg tr}def
/im{sv 15 1 roll dup/pstr x string def/exstr x 3 mul string def
/HTs xd/WDs xd/imc xd/Bdep xd/clu xd
idef p1x p1y m cup transform/cury xd/curx xd rot re
/Ws WDd def/Hs HTd def mirror curx cury itransform tr WDs HTs Bdep
[WDs 0 0 HTs neg 0 0]{currentfile pstr rh p
clu 1 eq{cexp}if clu 2 eq{bwexp}if}
imc 0 eq{image}{false 3 colorimage}ife rs}d
/kp{initclip clip np}d/l1{cup osv plen pwid 6 -1 roll rs sv}d
/l2{bp 7 2 roll co m}d/osh{dup -4 -4 rm gs show gr
dup 4 0 rm gs show gr dup 4 0 rm gs show gr dup 0 4 rm gs show gr
dup 0 4 rm gs show gr dup -4 0 rm gs show gr dup -4 0 rm gs show gr
dup 0 -4 rm gs show gr currentrgbcolor 4 3 roll 1 g 4 0 rm show setrgbcolor}d
/mo{dup/OutlineFlag known not{dup dup length 2 add dict begin
{1 ix/FID ne{def}{p p}ife}forall/UniqueID known{/UniqueID UniqueID 10000 add def}if
/PaintType PaintType 0 eq{2}{PaintType}ife def/StrokeWidth 15 def/OutlineFlag true def
/OutlineFont currentdict end definefont}if}d/O{currentfont/PaintType known{currentfont mo setfont}{/S/osh l}ife}d
/o{currentfont/PaintType known{bf setfont}{/S/show l}ife}d/R{/rF true def currentrgbcolor 1 .25 .25 setrgbcolor}d
/r{/rF false def eq3{1 sub neg gd p p}{setrgbcolor}ife}d/rc{dup FontDirectory x known{findfont}
{dup nb cvs dup length 1 sub get 82 eq{dup nb cvs dup length 1 sub 0 x getinterval
findfont begin currentdict dup length dict begin
{1 ix/FID ne{def}{p p}ife}forall/FontName xd/Encoding WPen def
currentdict dup end end/FontName get x definefont}
{findfont}ife}ife}d/rmtx mx def/S/show l/A/ashow l/W/widthshow l/AW/awidthshow l/sg{neg 100 add 100 div g}d/SH{bF2{/bF2 false def}if/S/ssh l/A/assh l/W/wssh l/AW/awssh l/sF true def}d
/sh{/S/show l/A/ashow l/W/widthshow l/AW/awidthshow l/sF false def bF{B}if}d/sp{gs s gr}d/ssh{sv x gs psz 20 div dup neg rm dup show gr dup sv x
currentfont/PaintType known{bf setfont}if 1 g show rs currentfont/PaintType known{currentfont mo setfont show}{osh}ife
cup 3 -1 roll rs m}d/ST{cup/Sy xd/Sx xd}d
/st{gs cup psz 4 div add mp Sx Sy psz 4 div add lp 10 w s gr}d
/U{cup/Uy xd/Ux xd}d/u{gs cup -24 add m Ux Uy -24 add li 12 w s gr}d
/ul{cup osv plen pwid 7 -2 roll rs rs bp 6 1 roll co m}d/WPen StandardEncoding 256 array copy def 0
[127/Aacute/Acircumflex/Adieresis/Agrave/Aring/Atilde/Ccedilla
/Delta/Eacute/Ecircumflex/Edieresis/Egrave/Eth/Gamma/Iacute/Icircumflex/Idieresis/Igrave/Lambda/Ntilde/Oacute
/Ocircumflex/Odieresis/Ograve/Omega/Otilde/Phi/Pi/Psi/Scaron/Sigma/TeXtext32/Theta/Thorn
176/Pts
181/dbar
190/Hbar
192/hbar
201/Ldot
204/ldot
209/Uacute/Ucircumflex/Udieresis/Ugrave/Upsilon/Xi/Yacute
/Ydieresis/Zcaron/aacute/acircumflex/adieresis/agrave/aring/atilde/brokenbar
226/approxequal
228/ccedilla/copyright/degree/divide
236/dotlessj/eacute/ecircumflex/edieresis/egrave
242/eth/ff/ffi
246/ffl/iacute
252/icircumflex/idieresis/igrave/logicalnot
1/minus/mu/multiply/ntilde/oacute/ocircumflex/odieresis/ograve/onehalf/onequarter/onesuperior/otilde/plusminus
/registered/scaron/thorn/threequarters/threesuperior/trademark/twosuperior/uacute/ucircumflex/udieresis
/ugrave/yacute/ydieresis/zcaron/IJ/ij/Eng/eng
]{dup type/nametype eq{WPen 2 ix 2 ix put p 1 add}{x
p}ife}forall p/URy 0 def/URx 0 def/LLy 0 def/LLx 0 def/dxcg 0 def/dx1 0 def/dx2 0 def/dx3 0 def
/cgray 0 def/curstep -1 def/dis 0 def/steps 0 def/gsteps 0 def/grot 0 def/gtype 0 def/ry 0 def
/rx 0 def/botg 0 def/topg 0 def/bgc 0 def/tgc 0 def/cgc 0 def
/extents{fpath flattenpath pathbbox/URy xd/URx xd/LLy xd/LLx xd}def
/dxcolor{cml 0 eq{cgray dxcg sub dup/cgray xd curstep -1 eq{g}
{/curstep curstep 1 sub def curstep 1 eq{p botg gd}{g}ife}ife}
{cgc aload p dx3 sub 3 1 roll dx2 sub 3 1 roll
dx1 sub 3 1 roll 3 array astore/cgc xd
cgc aload p setrgbcolor}ife}d/box{LLx LLy m URx LLy li URx URy li LLx URy li cp s}def
/calcdx{sub gsteps 1 sub div 255 div}def
/computegdx{topg botg calcdx/dxcg xd}def/computeRGBdx{mark tgc aload p bgc aload p
3 ix 1 ix calcdx/dx3 xd 4 ix 2 ix calcdx/dx2 xd
5 ix 3 ix calcdx/dx1 xd cleartomark}def
/ccdx{cml 0 eq{computegdx}{computeRGBdx}ife}def/stclr{cml 0 eq{topg gd/cgray currentgray def}
{tgc aload p c currentrgbcolor 3 array astore/cgc xd}ife}def/lgf{/steps gsteps def
ry 1 ne{stclr/gf{add}def/top URy LLy sub ry mul LLy add def
/lw URy top sub steps .5 sub div def lgfdo}if
stclr/gf{sub}def
ry 1 ne{/lw top LLy sub steps .5 sub div def}if lgfdo}def
/lgfdo{ry 1 ne{/center top def lw 2 div w
LLx center lw 4 div gf m URx center lw 4 div gf li s
/center center lw gf def LLx center m dxcolor}
{/lw URy LLy sub steps div def/top URy lw 2 div sub def
/center top def LLx top m/steps steps 1 add def}ife
lw w steps 1 sub dup/curstep xd{URx center li s center lw gf/center xd
LLx center m dxcolor}repeat/curstep -1 def}def/sgf{/steps gsteps .5 sub def
/midx URx LLx sub 1 rx sub mul def/midy URy LLy sub ry mul def
/width URx LLx sub def/dx width midx sub steps div def
/height URy LLy sub def/dy height midy sub steps div def
/dw width steps div def/dl height steps div def
width w stclr/xpos LLx def/ypos URy def/lw width def/lh height def
gsteps{xpos lw 2 div add ypos m xpos lw 2 div add ypos
lh sub li s/lw lw dw sub def/lh lh dl sub def/xpos xpos dx add def/ypos ypos dy sub def
lw w dxcolor}repeat/curstep -1 def}def
/dfc{dup mul x dup mul add sqrt dup dis gt{/dis xd}{p}ife}def
/fdis{URx LLx sub rx mul LLx add/midx xd
URy LLy sub ry mul LLy add/midy xd
/width URx LLx sub def/gcx width rx mul def/height URy LLy sub def/gcy height ry mul def
gcx gcy dfc width gcx sub gcy dfc
width gcx sub height gcy sub dfc gcx height gcy sub dfc}def/rgf{/steps gsteps def
fdis/lw dis steps .5 sub div def/radius lw def lw 2 div w stclr
midx lw 2 div sub midy m midx midy radius 2 div 0 361 arc s lw w
steps 1 sub
dup/curstep xd/curstep curstep 1 add def
{dxcolor midx midy radius 0 361 arc s/radius radius lw add def}repeat/curstep -1 def}def
/gf{fpath flattenpath/gsteps xd/grot xd/gtype xd/ry x 100 div def/rx x 100 div def
cml 0 eq{gtype 1 eq{x}if/botg xd/topg xd}{gtype 1 eq{6 3 roll}if
3 array astore/bgc xd
3 array astore/tgc xd}ife
sv[]0 sd eoclip gsteps 1 eq
{stclr f}{mcm 3 get 0 gt{/grot grot 180 add def}if grot re extents
gsteps 0 eq{csteps}if
ccdx gtype 0 eq
{lgf}{gtype 1 eq{sgf}{rgf}ife}ife}ife rs}d/csteps{fdis dis 72 div fr mul cs p p dup xres
eq{p p/gsteps xres def}{div/gsteps x round cvi dup 1 le{p 2}if def}ife}def
/ssf{dup 0 eq{p}{cs 3 ix 3 1 roll ss p p}ife}d/ssa{cs 4 1 roll p 1 ix 4 -1 roll ss p}d
/invalidcolortable? true def
/PATsc{aload length dup 1 eq{p dup null eq{p}{gd}ife}{p c}ife}d
/PATtcalc{gs x concat mcm x 2 ne{dup 4 get x dup 5 get x
XStep 0 drx XStep div x XStep div x 0 YStep drx YStep div x YStep div x
7 -3 roll astore}if gr}d
/PATmp{x dup length 7 add dict copy begin TilingType PATtcalc
/cm xd currentdict/Multi known not{/Multi 1 def}if/FontType 3 def/Encoding 256 array def
3 string 0 1 255{Encoding x dup 3 ix cvs cvn put}for p
/FontMatrix mx def/FontBBox BBox def/BuildChar{mark 3 1 roll x begin
Multi 1 ne{PaintData x get}{p}ife PaintType 2 eq Multi 1 ne or
{XStep 0 FontBBox aload p setcachedevice}{XStep 0 setcharwidth}ife currentdict/PaintProc load
end gs false PATredef exec true PATredef gr
cleartomark}d currentdict end/foo x definefont}d
/PATpcalc{PATDict/CurrentPattern get begin gs
cm sm BBox aload p p p tr pathbbox
gr YStep div ceiling 4 1 roll XStep div ceiling 4 1 roll
YStep div floor 4 1 roll XStep div floor 4 1 roll
2 ix sub cvi abs x 3 ix sub cvi abs x
4 2 roll YStep mul x XStep mul x end}d/PATfill{sv 5 1 roll PATDict/CurrentPattern get dup begin
setfont cm sm PaintType 2 eq{PATDict/PColor get PATsc}if
3 ix string 0 1 Multi 1 sub{3 ix 3 ix m
Multi 1 ne{dup PaintColors x get PATsc}if
0 1 7 ix 1 sub{2 ix x 2 ix put}for p
3 ix{cup 2 ix show YStep add m}repeat}for
5{p}repeat end rs}d/oldeofill/eofill l
/oldfill/fill l/oldstroke/stroke l/oldshow/show l/oldwidthshow/widthshow l/PATredef{userdict begin
{/eofill{/eoclip load PATdraw np}d/fill{/clip load PATdraw np}d
/stroke{PATstroke}d/show{0 0 null 0 0 6 -1 roll PATawidthshow}d
/widthshow{0 0 3 -1 roll PATawidthshow}d}{/eofill{oldeofill}d
/fill{oldfill}d/stroke{oldstroke}d/show{oldshow}d/widthshow{oldwidthshow}d}ife end}d
false PATredef
/PATdraw{PATpcalc gs 5 -1 roll exec np PATfill gr}d
/PATstroke{{cup strokepath m PATpcalc gs clip np PATfill gr np}stopped
{0.1 g oldstroke (Path is too complex, filling with light gray)=}if}d
/PATsstr 1 string def/PATawidthshow{{dup PATsstr dup 0 4 -1 roll put
false charpath/clip load PATdraw cup np m
3 ix eq{4 ix 4 ix rm}if 2 copy rm}forall
p p p p p cup np m}d/PATDict 3 dict def/PATsp{true PATredef PATDict begin/CurrentPattern xd
CurrentPattern/PaintType get 2 eq{/PColor xd}if/CColor[currentrgbcolor]def end}d
/PATusp{false PATredef PATDict begin CColor aload p c end p}d
/pdictt 20 dict def
pdictt begin/dummy null def/PaintType 1 def/PatternType 1 def/TilingType 2 def/BBox[0 0 1 1]def
/XStep 1 def/YStep 1 def/Multi 2 def/PaintData[{0 0 m 0 1 rl 1 0 rl 0 -1 rl cp
PaintColors 0 get aload p null ne{f}if p p}
{ptw pth true[ptw 0 0 pth neg 0 ptw]{Bitmap}imagemask}]def
/PaintProc{begin exec end}d end/makedict{pdictt 20 dict copy dup begin
x/Bitmap xd x/PaintColors xd gs initmatrix 1 1 drx idtransform sc
[ptws 0 0 pths 0 0]PATmp gr end}d
/setpat{/pth xd/ptw xd/pths xd/ptws xd makedict/instpat xd instpat PATsp}d/unsetpat{instpat PATusp}d
/snl{{/noload sv def}if}d/enl{{noload rs}if}d/nc 1 def
/colorimage where{p true}{false}ife{/nc 0
statusdict begin/processcolors where{p p processcolors}
{/deviceinfo where{p deviceinfo/Colors known
{p{deviceinfo/Colors get}}if}if}ife end def
nc 0 ne{systemdict/colorimage known
systemdict/setcolortransfer known
systemdict/currentcolortransfer known
systemdict/currentcmykcolor known
and and and not{/nc 0 def}if}if}if
nc dup 1 ne x dup 3 ne x 4 ne and and{/nc 0 def}if
nc 1 eq dup dup not snl{
/expandbw{expandfactor mul round cvi bwclut x get 255 div}d
/doclutimage{p/bwclut xd bpc dup 8 eq{p 255}{4 eq{15}{3}ife}ife
/expandfactor xd[/expandbw load/exec load dup currenttransfer x]
cvx bind settransfer
iw ih bpc[1 0 0 -1 0 ih]setupimageproc
image}d}if
not enl
nc dup 3 eq x 4 eq or
dup dup not snl{/nullproc{{}}def
/concatutil{/exec load 7 -1 roll/exec load}d/defsubclut{1 add getinterval def}d
/spconcattransfer{/Dclut x def/Cclut x def/Bclut x def/Aclut x def/ncompute x l
currentcolortransfer[{Aclut ncompute}concatutil]cvx[{Bclut ncompute}concatutil]cvx
[{Cclut ncompute}concatutil]cvx[{Dclut ncompute}concatutil]cvx
setcolortransfer}d/setuprgbcluts{/bit3x rgbclut length 3 sub def
/bit1x bit3x 3 idiv def/rclut rgbclut def/gclut rclut 1 bit3x defsubclut
/bclut rclut 2 bit3x defsubclut}d}if not enl
nc 3 eq dup dup not snl{/3compute{x bit3x mul round cvi get 255 div}d
/doclutimage{/rgbclut xd p setuprgbcluts/3compute rclut gclut bclut dup
spconcattransfer iw ih bpc[1 0 0 -1 0 ih][setupimageproc/exec load/dup load dup]cvx
nullproc nullproc true 3 colorimage}d}if not enl
nc 4 eq
dup dup not snl{/stuffclut{cmykindex 3 -1 roll put}d
/ftoint{1 x sub 255 mul round cvi}d/4compute{x bit4x mul round cvi get 255 div}d
/computecmykclut{setuprgbcluts/bit4x rgbclut length 3 idiv 4 mul 4 sub def
/cmykclut bit4x 4 add string def/cclut cmykclut def
/mclut cclut 1 bit4x defsubclut/yclut cclut 2 bit4x defsubclut
/kclut cclut 3 bit4x defsubclut/cmykindex 0 def
0 1 bit1x{dup/cmykindex x
bit1x x sub 4 mul def 3 mul dup rclut x get 255 div
x dup gclut x get 255 div x bclut x get 255 div
setrgbcolor currentcmykcolor ftoint kclut stuffclut
ftoint yclut stuffclut ftoint mclut stuffclut
ftoint cclut stuffclut}for}d/doclutimage{/rgbclut xd p invalidcolortable?
{computecmykclut}if/4compute cclut mclut yclut kclut spconcattransfer
iw ih bpc[1 0 0 -1 0 ih][setupimageproc/exec load/dup load dup dup]cvx
nullproc nullproc nullproc true 4 colorimage}d}if not enl
nc 0 eq dup dup not
snl{/las{3 mul 3 getinterval putinterval x
3 add x 3 copy}d/8lookup/las l/4lookup{/byte 1 ix def -4 bitshift
las byte 15 and las}d
/2lookup{/byte 1 ix def -6 bitshift las
byte -4 bitshift 3 and las byte -2 bitshift
3 and las byte 3 and las}d/colorexpand{mystringexp 0 rgbclut
3 copy 7 -1 roll/mylookup load forall p p p p p}d
/createexpandstr{/mystringexp x mystring length mul string def}d
/doclutimage{/rgbclut xd p/mylookup bpc 8 eq
{3 createexpandstr/8lookup}{bpc 4 eq{6 createexpandstr/4lookup}{12 createexpandstr
/2lookup}ife}ife l iw ih bpc[1 0 0 -1 0 ih]
[setupimageproc/exec load/colorexpand load/exec load]cvx
false 3 colorimage}d}if not enl
/colorimage where{p true}{false}ife dup{/do24image{iw ih 8[1 0 0 -1 0 ih]
setupimageproc false 3 colorimage}d}if
dup dup snl not{/rgbtogray{/str xd/len str length def/smlen len 3 idiv def
/rstr str def/gstr str 1 len 1 sub getinterval def/bstr str 2 len 2 sub getinterval def
str dup 0 1 smlen 1 sub{dup 3 mul rstr 1 ix get .3 mul
gstr 2 ix get .59 mul add bstr 3 -1 roll get .11 mul add
round cvi put dup}for p 0 smlen getinterval}d/do24image{iw ih 8[1 0 0 -1 0 ih]
[setupimageproc/exec load/rgbtogray load/exec load]cvx bind
image}d}if enl/doimage{iw ih 8[1 0 0 -1 0 ih]setupimageproc image}d
/setup1asciiproc{[currentfile mystring/rh cvx/p cvx]cvx bind}d
/setup1binaryproc{[currentfile mystring/readstring cvx/p cvx]cvx bind}d
/iw 0 def/ih 0 def/im_save 0 def/setupimageproc 0 def/polarity 0 def
/smoothflag 0 def/mystring 0 def/bpc 0 def/beginimage{/im_save sv def dup 0 eq
{p/setup1binaryproc}{1 eq{/setup1asciiproc}
{(error, can't use level2 data acquisition procs for level1)print flush}ife}ife
/setupimageproc x l/polarity xd/smoothflag xd tr sc/mystring x string def/bpc xd/ih xd/iw xd}d
/endimage{im_save rs np}d/1bitbwcopyimage{1 g 0 0 m 0 1 rl 1 0 rl 0 -1 rl cp fill
0 g iw ih polarity[1 0 0 -1 0 ih]setupimageproc imagemask}d/1bitcopyimage{setrgbcolor
0 0 m 0 1 rl 1 0 rl 0 -1 rl cp fill
setrgbcolor iw ih polarity[1 0 0 -1 0 ih]setupimageproc
imagemask}d/1bitmaskimage{setrgbcolor
iw ih polarity[1 0 0 -1 0 ih]setupimageproc
imagemask}d
/BeginEPSF{end
userdict begin/showpage{}def
/b4 sv def/d_cnt countdictstack def/op_cnt count 1 sub def
0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin
10 setmiterlimit[]0 setdash newpath/languagelevel where{p languagelevel 1 ne
{false setstrokeadjust false setoverprint}if}if}d
end
userdict begin/EndEPSF{count op_cnt sub{pop}repeat
countdictstack d_cnt sub{end}repeat b4 end restore wpdict begin}bind def end
%%EndProlog
/#copies 1 def wpdict begin
bd
/cml 1 def
letter
%%Page: 1 1
bp
0 13200 10200 co
/HelveticaR 498 ff
0 13200 10200 co
mcm
1404 11979 tr
1 -1 sc np 0 0 m
13 0 li 13 5937 li 0 5937 li cp
0 255 div g
[] 0 sd 13 w 0 lj 0 lc fill np 0 0 m
7293 0 li 7293 13 li 0 13 li cp
0 255 div g
fill np 7280 0 m
7293 0 li 7293 5937 li 7280 5937 li cp
0 255 div g
fill np 0 5924 m
7293 5924 li 7293 5937 li 0 5937 li cp
0 255 div g
fill 0 w 0 lc sm
icl
mcm
1420 11963 tr
1 -1 sc mcm
np 0 0 m
7264 0 li 7264 5908 li 0 5908 li cp
icl clip 0.0 147.0 tr
1.0 -1.0 sc 0.0 -5613.0 tr
3632.0 2806.5 tr
0.55030 0.55029 sc -6600.0 -5100.0 tr
0 255 div g
2 lj 0 lc mcm
[0.41131 0.0 0.0 0.41131 693.0 3299.0 ] concat
mcm
[0.99395 0.0 0.0 0.99395 1.0 1.0 ] concat
mcm
[1.0 0.0 0.0 1.0 5181.0 3796.0 ] concat
np 0 6037 m
439 0 li 5524 1868 li 5102 5516 li cp
61 w s bzcl sm
mcm
[1.0 0.0 0.0 1.0 393.0 3666.0 ] concat
np 4507 6240 m
1596 4835 li 1612 3880 li 0 2982 li 563 29 li 4992 0 li cp
s bzcl sm
mcm
[1.0 0.0 0.0 1.0 5635.0 4607.0 ] concat
np 0 4763 m
485 0 li 4617 1289 li 4304 4358 li cp
s bzcl sm
mcm
[1.0 0.0 0.0 1.0 757.0 4141.0 ] concat
mcm
[1.0 0.0 0.0 1.0 90.0 2276.0 ] concat
np 0 0 m
1142 521 li s bzcl sm
mcm
[1.0 0.0 0.0 1.0 246.0 1509.0 ] concat
np 0 0 m
1111 448 li s bzcl sm
mcm
[1.0 0.0 0.0 1.0 372.0 770.0 ] concat
np 0 0 m
1032 333 li s bzcl sm
mcm
[1.0 0.0 0.0 1.0 528.0 90.0 ] concat
np 0 0 m
939 87 li s bzcl sm
sm
mcm
[1.0 0.0 0.0 1.0 1113.0 945.0 ] concat
np 0 2533 m
16 723 li 4913 0 li 4522 2490 li cp
61 w s bzcl sm
mcm
[1.0 0.0 0.0 1.0 5870.0 1031.0 ] concat
np 0 2476 m
438 0 li 4929 2751 li 4851 4314 li cp
s bzcl sm
mcm
[1.0 0.0 0.0 1.0 6918.0 366.0 ] concat
np 0 390 m
47 839 li 3662 115 li 3318 0 li cp
s bzcl sm
mcm
[1.0 0.0 0.0 1.0 7169.0 612.0 ] concat
np 0 752 m
3662 0 li 5399 2663 li 3896 3025 li cp
s bzcl sm
mcm
[1.0 0.0 0.0 1.0 10971.0 1437.0 ] concat
np 830 1201 m
0 0 li s bzcl sm
mcm
[1.0 0.0 0.0 1.0 10612.0 858.0 ] concat
np 156 246 m
0 0 li s bzcl sm
mcm
[1.0 0.0 0.0 1.0 11942.0 2855.0 ] concat
np 203 305 m
0 0 li s bzcl sm
mcm
[1.0 0.0 0.0 1.0 8092.0 1509.0 ] concat
np 0 0 m
3052 1868 li s bzcl sm
mcm
[1.0 0.0 0.0 1.0 9234.0 1379.0 ] concat
np 0 0 m
1894 1766 li s bzcl sm
mcm
[1.0 0.0 0.0 1.0 10283.0 1176.0 ] concat
np 0 0 m
1189 1723 li s bzcl sm
mcm
[1.0 0.0 0.0 1.0 11410.0 3174.0 ] concat
np 0 58 m
281 0 li s bzcl sm
mcm
[1.0 0.0 0.0 1.0 9829.0 1306.0 ] concat
np 0 0 m
1315 1521 li s bzcl sm
mcm
[1.0 0.0 0.0 1.0 8796.0 1553.0 ] concat
np 0 0 m
1565 1158 li s bzcl sm
mcm
[1.0 0.0 0.0 1.0 366.0 398.0 ] concat
27 bzct np 6318 329 m
5866 112 5497 7 5207 11 cv
4917 15 4814 313 4581 358 cv
4348 403 4125 255 3814 286 cv
3503 317 3038 536 2719 547 cv
2400 558 2182 325 1905 358 cv
1628 391 1376 638 1060 749 cv
744 860 105 880 11 1024 cv
-83 1168 78 1366 496 1618 cv
s bzcl sm
mcm
[1.0 0.0 0.0 1.0 9512.0 4426.0 ] concat
6 bzct np -12 -7 m
466 184 784 309 943 369 cv
s bzcl sm
mcm
[1.0 0.0 0.0 1.0 6261.0 2798.0 ] concat
np mcm
219 217 tr
219 217 sc 0.0 0.0 1.0 0.0 360.0 arc sm
s bzcl sm
mcm
[1.0 0.0 0.0 1.0 6465.0 2030.0 ] concat
np mcm
117 152 tr
117 152 sc 0.0 0.0 1.0 0.0 360.0 arc sm
s bzcl sm
mcm
[1.0 0.0 0.0 1.0 8921.0 3160.0 ] concat
np 0 1056 m
94 0 li s bzcl sm
mcm
[1.0 0.0 0.0 1.0 9626.0 3507.0 ] concat
np 0 507 m
47 0 li 954 536 li 892 883 li cp
s bzcl sm
mcm
[1.0 0.0 0.0 1.0 9829.0 3883.0 ] concat
np 0 0 m
516 275 li 27 255 div g
gs
eofill gr
0 255 div g
s bzcl sm
sm
mcm
[1.0 0.0 0.0 1.0 6118.0 6244.0 ] concat
np 764 1872 m
0 1914 li 202 0 li 943 250 li 876 978 li 539 936 li 49 w s bzcl sm
mcm
[1.0 0.0 0.0 1.0 7264.0 8095.0 ] concat
np 0 42 m
607 0 li s bzcl sm
mcm
[1.0 0.0 0.0 1.0 7376.0 6556.0 ] concat
np 0 0 m
607 166 li s bzcl sm
mcm
[1.0 0.0 0.0 1.0 7578.0 6618.0 ] concat
np 90 0 m
0 1477 li s bzcl sm
mcm
[1.0 0.0 0.0 1.0 8230.0 6743.0 ] concat
np 68 0 m
0 1352 li 360 832 li 517 1373 li 629 187 li s bzcl sm
mcm
[1.0 0.0 0.0 1.0 9084.0 6930.0 ] concat
np 90 0 m
0 1124 li 405 1103 li 427 666 li 45 583 li s bzcl sm
sm
mcm
[1.0 0.0 0.0 1.0 8285.0 5727.0 ] concat
np 0 1643 m
0 0 li 3011 0 li 3011 2974 li 2292 1643 li 2292 2225 li 1663 1643 li 1663 2163 li 1101 1643 li 1101 2121 li 584 1643 li 584 2100 li cp
s bzcl sm
mcm
[1.0 0.0 0.0 1.0 8170.0 1414.0 ] concat
mcm
[1.0 0.0 0.0 1.0 407.0 378.0 ] concat
np 438 438 438 0.0 360.0 arc s bzcl sm
mcm
[1.0 0.0 0.0 1.0 53.0 24.0 ] concat
mcm
[1.0 0.0 0.0 1.0 295.0 295.0 ] concat
np 498 927 m
516 1010 li 694 982 li 682 905 li 795 829 li 842 856 li 943 719 li 901 691 li 937 516 li 1002 516 li 967 307 li 895 329 li 812 198 li 848 121 li 676 33 li 652 93 li 516 60 li 504 0 li 332 33 li 350 88 li 201 170 li 160 132 li 59 252 li 130 285 li 77 423 li 12 406 li 0 576 li 71 576 li 124 719 li 65 757 li 172 883 li 219 823 li 290 878 li 267 955 li 373 988 li 391 916 li cp
s bzcl sm
mcm
[1.0 0.0 0.0 1.0 831.0 259.0 ] concat
mcm
[1.0 0.0 0.0 1.0 355.0 349.0 ] concat
np 831 831 831 0.0 360.0 arc s bzcl sm
mcm
[1.0 0.0 0.0 1.0 294.0 294.0 ] concat
np 184 433 m
137 384 li 255 241 li 314 291 li 433 203 li 409 137 li 540 66 li 575 115 li 735 77 li 724 11 li 919 0 li 919 55 li 1073 77 li 1103 5 li 1275 82 li 1240 132 li 1376 214 li 1423 170 li 1530 274 li 1483 313 li 1578 411 li 1643 395 li 1708 527 li 1643 554 li 1690 675 li 1761 669 li 1785 801 li 1726 818 li 1708 960 li 1767 988 li 1755 1125 li 1696 1125 li 1649 1246 li 1714 1289 li 1625 1405 li 1578 1355 li 1477 1476 li 1518 1503 li 1412 1608 li 1376 1553 li 1245 1641 li 1275 1690 li 1127 1739 li 1109 1684 li 955 1706 li 955 1761 li 818 1767 li 807 1706 li 658 1673 li 617 1739 li 486 1673 li 504 1608 li 386 1553 li 338 1597 li 249 1503 li 285 1459 li 225 1372 li 166 1394 li 101 1289 li 148 1256 li 107 1141 li 30 1136 li 6 999 li 65 988 li 59 845 li 0 823 li 30 675 li 89 669 li cp
s bzcl sm
sm
sm
sm
mcm
np 9746 5165 m
9746 4375 li 157 w s bzcl np 9746 5560 m
9926 4999 li 9746 5144 li 9566 4999 li 9746 5560 li cp
0 w 1 lc gs
eofill gr
s bzcl np 9746 3959 m
9566 4520 li 9746 4396 li 9926 4520 li 9746 3959 li cp
gs
eofill gr
s bzcl sm
mcm
[1.0 0.0 0.0 1.0 8397.0 8751.0 ] concat
0.0 0.0 tr
mcm
0.0 194.0 tr
np 28 152 m
32 128 32 112 36 100 cv
40 88 48 76 56 60 cv
92 16 148 -8 228 -8 cv
256 -8 280 -4 300 0 cv
320 8 336 16 352 28 cv
392 56 412 96 412 140 cv
412 168 404 192 392 208 cv
380 220 372 232 364 236 cv
356 240 340 248 316 256 cv
168 316 li
156 320 148 324 140 328 cv
136 336 132 344 132 352 cv
132 368 140 380 156 388 cv
172 400 192 404 216 404 cv
240 404 260 400 276 388 cv
288 376 300 356 304 332 cv
400 332 li
396 380 380 416 352 444 cv
316 472 272 484 212 484 cv
160 484 120 472 88 444 cv
56 416 40 384 40 340 cv
40 328 40 316 44 300 cv
48 288 56 276 60 268 cv
76 252 96 236 132 224 cv
276 168 li
304 156 316 144 316 128 cv
316 112 308 96 292 88 cv
276 76 252 72 228 72 cv
204 72 184 76 164 84 cv
152 92 144 100 140 108 cv
132 120 128 132 124 152 cv
cp
49 w 0 lc gs
eofill gr
s bzcl 438.0 0.0 tr
np 344 224 m
336 268 320 300 296 324 cv
268 344 232 356 184 356 cv
132 356 92 340 64 308 cv
36 276 20 232 20 176 cv
20 116 36 72 64 40 cv
92 8 132 -8 184 -8 cv
232 -8 268 4 292 28 cv
320 52 336 84 344 132 cv
252 132 li
244 108 236 92 228 80 cv
216 72 204 68 188 68 cv
164 68 152 72 140 84 cv
132 92 128 104 124 120 cv
116 140 116 156 116 176 cv
116 212 124 236 136 256 cv
148 276 164 284 188 284 cv
208 284 220 280 228 272 cv
240 260 248 248 252 224 cv
cp
gs
eofill gr
s bzcl 365.0 0.0 tr
np 44 348 m
44 -4 li
136 -4 li
136 172 li
136 232 164 260 216 260 cv
228 260 li
244 260 li
244 356 li
228 356 li
224 356 li
208 356 192 348 176 336 cv
160 324 144 312 136 292 cv
136 348 li
cp
gs
eofill gr
s bzcl 255.0 0.0 tr
np 44 348 m
44 0 li
136 0 li
136 348 li
cp
44 476 m
44 392 li
136 392 li
136 476 li
cp
gs
eofill gr
s bzcl 182.0 0.0 tr
np 44 348 m
44 -132 li
140 -132 li
140 52 li
152 28 168 16 184 4 cv
196 -4 216 -8 236 -8 cv
284 -8 316 8 340 44 cv
368 76 380 120 380 176 cv
380 232 368 276 344 308 cv
320 340 288 356 244 356 cv
224 356 204 352 188 344 cv
172 332 156 320 140 300 cv
140 348 li
cp
136 176 m
136 208 144 232 156 248 cv
168 268 188 276 212 276 cv
236 276 256 268 268 248 cv
284 232 288 208 288 176 cv
288 144 280 116 268 100 cv
252 80 236 72 212 72 cv
188 72 168 80 156 100 cv
140 116 136 144 136 176 cv
cp
gs
eofill gr
s bzcl 401.0 0.0 tr
np 12 348 m
12 284 li
56 284 li
56 104 li
56 84 56 68 56 60 cv
60 52 60 44 64 36 cv
72 8 104 -8 152 -8 cv
168 -8 184 -8 204 -4 cv
204 64 li
192 64 li
172 64 160 64 156 68 cv
148 72 148 80 148 96 cv
148 284 li
204 284 li
204 348 li
148 348 li
148 440 li
56 440 li
56 348 li
cp
gs
eofill gr
s bzcl 218.0 0.0 tr
np 16 220 m
16 136 li
200 136 li
200 220 li
cp
gs
eofill gr
s bzcl 218.0 0.0 tr
np 44 476 m
44 4 li
144 4 li
144 204 li
348 204 li
348 284 li
144 284 li
144 392 li
380 392 li
380 476 li
cp
gs
eofill gr
s bzcl 401.0 0.0 tr
np 40 348 m
40 140 li
40 116 40 100 44 88 cv
44 76 48 64 52 52 cv
60 36 76 20 92 8 cv
112 -4 132 -8 156 -8 cv
184 -8 204 -4 220 8 cv
236 16 248 32 264 56 cv
264 0 li
356 0 li
356 348 li
264 348 li
264 184 li
264 164 264 148 260 136 cv
260 124 256 112 252 104 cv
244 84 224 72 192 72 cv
168 72 156 76 144 88 cv
136 100 132 120 132 148 cv
132 348 li
cp
gs
eofill gr
s bzcl 401.0 0.0 tr
sm
sm
mcm
[1.0 0.0 0.0 1.0 9206.0 806.0 ] concat
0.0 0.0 tr
mcm
0.0 194.0 tr
np 268 176 m
376 176 li
368 144 356 120 336 100 cv
316 84 292 76 260 76 cv
220 76 188 92 164 120 cv
140 148 128 188 128 236 cv
128 288 140 328 164 356 cv
188 388 220 400 260 400 cv
296 400 324 388 344 368 cv
352 356 360 344 364 324 cv
464 324 li
456 376 436 416 400 444 cv
364 472 316 484 260 484 cv
188 484 132 460 92 416 cv
48 372 28 308 28 232 cv
28 164 48 104 88 60 cv
128 16 180 -8 244 -8 cv
304 -8 352 16 388 60 cv
396 0 li
464 0 li
464 256 li
268 256 li
cp
gs
eofill gr
s bzcl 510.0 0.0 tr
np 40 476 m
40 0 li
140 0 li
140 476 li
cp
gs
eofill gr
s bzcl 182.0 0.0 tr
np 44 476 m
44 0 li
136 0 li
136 396 li
224 0 li
320 0 li
408 396 li
408 0 li
500 0 li
500 476 li
352 476 li
288 204 li
284 176 li
280 160 li
272 112 li
264 160 li
260 176 li
256 204 li
192 476 li
cp
gs
eofill gr
s bzcl 547.0 0.0 tr
np 44 476 m
44 4 li
144 4 li
144 172 li
236 172 li
264 172 284 176 304 180 cv
320 184 332 192 348 200 cv
384 228 404 272 404 328 cv
404 384 384 424 344 452 cv
332 464 316 468 304 472 cv
288 476 268 476 240 476 cv
cp
144 256 m
144 392 li
220 392 li
252 392 272 388 284 376 cv
300 364 304 348 304 324 cv
304 300 296 280 284 272 cv
272 260 248 256 220 256 cv
cp
gs
eofill gr
s bzcl 438.0 0.0 tr
sm
sm
mcm
np 5206 7099 m
7948 9117 li 0 255 div g
61 w s bzcl np 8150 9262 m
7925 8950 li 7925 9117 li 7791 9138 li 8150 9262 li cp
0 w 1 lc gs
eofill gr
s bzcl sm
mcm
np 5228 5955 m
7678 2295 li 61 w 2 lc s bzcl np 7813 2108 m
7521 2337 li 7656 2337 li 7701 2461 li 7813 2108 li cp
0 w 1 lc gs
eofill gr
s bzcl sm
0 w 0 lj 0 lc sm
sm
icl
ep
ed end


File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,935 +0,0 @@
\documentclass{article}
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\setlength{\headsep}{0pt}
\setlength{\topmargin}{0in}
\setlength{\textheight}{8.75in}
\setlength{\textwidth}{6.5in}
\setlength{\parindent}{0in}
\setlength{\parskip}{2ex}
\usepackage{tabularx}
\usepackage{multicol}
\usepackage{epsf}
\usepackage{amstex}
\usepackage{array}
\usepackage{xspace}
\usepackage{float}
\newcommand{\figref}[1]{{\em Figure ~\ref{#1}}\xspace}
\renewcommand{\labelenumi}{\theenumi.}
\floatstyle{ruled}
\newfloat{code}{h}{loc}
\floatname{code}{Example Code}
\newcommand{\myfigone}[3]{
\def\@captype{figure}
\begin{table}
\bigskip
\begin{center}
\leavevmode
\epsfysize=#2 \epsfbox{#1.eps}
\caption{#3} \label{#1}
\end{center}
\end{table}}
\newcommand{\myfigtwo}[3]{
\def\@captype{figure}
\begin{table*}
\bigskip
\begin{center}
\leavevmode
\epsfysize=#2 \epsfbox{#1.eps}
\caption{#3} \label{#1}
\end{center}
\end{table*}}
\begin{document}
\twocolumn
\begin{titlepage}
\title{{\bf Script-Fu: Graphic Art for Everyone}}
\author{Spencer Kimball\\
eXperimental Computing Facility\\
University of California at Berkeley\\
spencer@@xcf.berkeley.edu}
\maketitle
\thispagestyle{empty}
\begin{abstract}
With the advent of the World Wide Web (WWW), individuals
have an unprecedented ability to disseminate information at little or
no cost. Because of its accessibility, the flow of information on the
WWW is staggering, and appears to be sustaining its incredible rate of
growth. With so much competing information, presentation becomes
as--or even more--important than content; visually appealing web pages
are likely to attract the most attention. {\bf Script-Fu} is a newly
developed application which automatically creates the graphics
necessary to present information compellingly. Script-Fu is designed
to maximize power and flexibility and it accomplishes this goal using
a three-component architecture. This architecture is composed of an
image manipulation engine (for the computations necessary to create
graphics), a scripting language (for precisely describing the
algorithms required to create the graphics), and a
facilitator/management program (for user-interface and communication
between the components). This choice of components maximizes the
power of Script-Fu, but in some cases lessens the accessibility. For
example, the image manipulation engine, GIMP, runs only on UNIX
workstations, not on Macintoshes or PCs. A fourth component, Net-Fu,
solves this dilemma by providing an alternate interface to Script-Fu,
making its functionality available to anyone who has access to a WWW
browser application such as {\it Netscape} or {\it Microsoft Internet
Explorer}. Using both Script-Fu and the WWW, virtually anyone can
present information compellingly, and at low cost.
\end{abstract}
\end{titlepage}
\section{Introduction}
Company logos, product names, and eye-catching slogans are as
ubiquitous as they are necessary for successful marketing.
Traditionally, this sort of graphic design work lay squarely in the
realm of the professional artist. A company which required art for
magazine ads, CD or record labels, book covers, posters, or product
brochures would contract the services of a graphic design firm.
Individuals not associated with large companies had little use for
such artwork, because both the cost of advertising and the cost of
graphic design were prohibitive.
Things have changed. The cost of advertising has gone through the
floor, while the cost of graphic design remains high. Individuals now
have the ability to advertise products, ideas, and opinions, but lack
the means to present them in a compelling fashion. {\bf Script-Fu}, a
piece of computer software developed to address this situation, makes
high-quality graphic design an option available to everyone.
The advent of the World Wide Web (WWW) is rapidly changing the face of
the world's information infrastructure. The WWW is a conglomeration
of distinct ``web sites'' linked together by what are known as
``hyperlinks''. It is built on the ``internet'', a global
communications network for computer-based communications. If the WWW
were compared to a railway system, web sites would correspond to train
stations, and hyperlinks to tracks. Web sites contain publicly
available information including text, images, animations, and sound.
Users travel from web site to web site to find information of
interest, using a program known as a ``browser'' ({\it Netscape} and
{\it Microsoft Internet Expolorer} are examples of widely available
browsers). The browser, then, is like a train that carries the user
from one depot of information to the next, following hyperlinks
between web sites.
What makes the WWW so revolutionary is the cost at which it allows
individuals to disseminate information. Because of the distributed
architecture of the internet\footnote{The internet was originally
intended as a network to inter-connect research facilities and
universities. It was designed so that each participant would have to
contribute to the overall operation. For example, a computer on the
internet in Michigan might help forward information from Berkeley to
MIT.} and the low cost of personal computers, anyone can establish a
presence on the World Wide Web for under \$10,000. On the WWW,
individuals have as much right and recourse to advertising as large
corporations. In this context, ``advertise'' has a wide range of
meanings--from actual product marketing to information exchange and
the publication of ideas and opinions.
As recently as 1985, the internet consisted of roughly 50 sites.
Today, the count is higher than 100,000, and is rapidly increasing.
In fact, the naming conventions which assign each site on the internet
a unique, identifying name, have to be changed to account for the
unexpected magnitude of expansion \cite{ipv6}.
This expansion of the internet is blamed by most on the staggering
growth of the world wide web, as universities, companies,
organizations, and individuals race to take advantage of this nascent
means of mass-communication. In the confusion of this mad scramble,
attention spans for web-surfers (users who access the information on
the WWW) have reached all time lows. Like more traditional forms of
mass-media--radio and TV, for example--the format and appeal of
packaging is becoming as important or more important than the actual
content. Imagine a TV with literally millions of channels available
and an efficient interface for searching them for items of interest.
The importance of high quality, eye-catching presentations assumes an
unprecedented magnitude in this context. It would be a rare
web-surfer indeed, who would bother with a web page that contained no
concessions to visual or auditory stimulation.
\myfigtwo{timeline}{6cm}{There is an emerging need for graphic art
solutions that support the needs of individuals, who can't afford
professional graphic designers.}
While the cost of advertising has plummeted with the World Wide Web,
the cost of graphic design has not decreased. If anything, the
extreme demand generated by the WWW has pushed the price of graphic
design through the roof in the short-term; prices will remain high
until the graphic design industry can grow large enough to satisfy
current and future demand.
The World Wide Web is here to stay. Its growth continues at an almost
impossible rate and the exploration of its benefits is just beginning.
The WWW will certainly be here for the next five years, and what the
future holds is undoubtedly even more surprising than the recent
advances in information exchange. Through it all, the requirement
that information be presented compellingly is unlikely to change, as
human nature seems constant in that regard. Script-Fu targets the
problem of information packaging and is therefore well-suited to the
needs of both the present and the immediate future.
\section{Requirements}
What is ``high-quality graphic art''? This term needs to be defined
before an application purported to automatically generate graphic art
is described. Where Script-Fu is concerned, the definition is limited
to the current standard for {\it logos} typically found on
professionally designed web pages\footnote {The term should, in fact,
describe the overall composition of graphics, text and background
which make up a web page.}. Logos should have the option to be
generated from a wide range of typefaces, sizes, colors, backgrounds,
and styles, including such exotic motifs as neon, chrome, crystal, and
carved marble or wood. The task that Script-Fu tackles is simply put:
to generate logos in a wide variety of styles with configurable
options, at a level of quality comparable to professionally done
graphic design work. Additionally, the graphic art should be
generated automatically, and in tens of seconds, where traditional
artists painstakingly produce artwork on a timescale of hours.
\figref{logo} is a \emph{very} simple example of a logo which
Script-Fu might generate\footnote {We will discuss the creation of
this logo in detail throughout the following sections. For an actual
Script-Fu {\it scheme} script that generates similar logos, refer to
Appendix A. {\bf Warning:} Unless you are familiar with both
programming languages and typical {\it Photoshop}\cite{photoshop}/{\it
GIMP}\cite{GIMP} usage, the code listed in the appendix will be
confusing.}.
Many factors must be considered in the design of an application which
meets the requirements discussed above. Most important are
flexibility and power. To meet the requirement that it generate
``high-quality'' graphic art, Script-Fu must be flexible and easy to
expand upon; new and more impressive logo designs are constantly
evolving and must be incorporated into the system as they emerge.
Script-Fu must also be extremely powerful, as impressive logos
typically involve a complex process which--in the case of automated
logo creation--requires that software make decisions that were
formerly made by human artists. Sections 3 and 4 in this paper
discuss the architecture necessary to achieve these goals, as well as
how the components of the architecture interact to get the job done.
One factor which is easily overlooked, but of utmost importance, is
the user-interface. Script-Fu has a traditional user interface in the
sense that when you run the software on a computer, it displays a
window with the necessary options for logo generation. However, to
maximize the availability and appeal of Script-Fu, a secondary
interface called {\bf Net-Fu} was designed. Section 5 discusses this
additional interface in detail.
\myfigone{logo}{6cm}{A simple example of a composited logo. The logo
consists of highlights, the logo text, and shadows.}
\section{Architecture}
The architecture of Script-Fu is carefully designed with the goals of
flexibility and power in mind. The architecture consists of three
primary components and is illustrated in \figref{architecture}:
\begin{itemize}
\item An underlying image manipulation engine for computing each step
of the logo generation process.
\item A mechanism for automating the logo creation process.
\item An intermediary which oversees the progress of the other two
components and facilities communication between them.
\end{itemize}
\subsection{GIMP--Image Manipulation Engine}
In theory, Script-Fu could include all of the necessary image
manipulation operations for creating logos. However, this would
involve hundreds of thousands of lines of program code and immense
amounts of development time. Instead, the architecture calls for the
leveraging of an existing image manipulation ``engine''--in the
context of our simple logo example (\figref{logo}), this is a piece of
software that actually performs the computations necessary to create
highlights, text, and shadows and then combine them into a final logo.
\myfigone{architecture}{6cm}{Script-Fu and GIMP are stand-alone
executables running on one machine, communicating with each other.}
Professional graphic design artists have long used Photoshop
\cite{photoshop}, a software package from Adobe for their image
manipulation needs. Photoshop is a complicated, powerful, and
highly-respected piece of software that is employed in nearly all
computer-based image manipulation tasks (such as photo-retouching,
graphic art design, and image composition). Photoshop was not chosen
for use with Script-Fu. There are a number of reasons for this
decision. Among them are the price point of Photoshop--around \$500,
the lack of support for UNIX platforms--which are better suited to
batch processing, and most importantly, the lack of a facility for
supporting complex, automated control. In plain English, Photoshop
does not have the necessary means through which other applications can
direct its actions.
Instead, Script-Fu was implemented using an image manipulation engine
known as the GNU Image Manipulation Program (GIMP) \cite{GIMP}. GIMP
is free software (meaning both its source code, and the runnable
application can be downloaded and used free of
charge)\footnote{ftp://ftp.xcf.berkeley.edu/pub/gimp}, making it
possible to offer Script-Fu without a restrictive usage policy or the
requirement of commercial software. GIMP runs on nearly all UNIX
platforms, the ideal setting for large batch processing operations.
Finally, GIMP has a facility for supporting extensions, which are
perfectly suited to the needs of Script-Fu. A GIMP extension is a
stand-alone program that extends the functionality of the main
application. The extension and GIMP communicate with each other, and
through this line of communication, the extension can command GIMP to
execute any operation\footnote{See appendix B for a discussion of
extensions and how they interact with GIMP}.
\subsection{Scheme--Scripting Language}
There are two primary mechanisms typically employed for automated
processing of the type used in Script-Fu: batch processing and
scripting. Batch processing is used primarily for automating only the
most simplistic procedures--tasks in which nothing changes from one
invocation to the next, and no decisions need to be made based on
variable input values. This is not a suitable solution for Script-Fu.
Based on the name {\bf Script}-Fu, it should be obvious that scripting
is the solution of choice.
Scripting allows far more flexibility than batch processing because it
often incorporates an actual programming language. A programming
language is a means to specify an algorithm (a list of steps for the
computer to complete) with complex, language-like control structures.
For example, decisions can be made by evaluating whether a given
condition is true and executing one command if it is, and another
command if it is not. Here is a good example of such a control
structure, commonly referred to as an {\it if-then-else} structure:
{\scriptsize
\begin{verbatim}
if (image_is_color (img)) then
set_color (RED)
else
set_color (BLACK)
\end{verbatim}}
The {\it if-then-else} structure demonstrated in the example above
evaluates whether the image contained in the {\it img} variable is a
color image. {\it If} it is, then the color is set to red; otherwise,
the color is set to black. This simple example would be extended in an
actual script to make complex decisions based on the user's specified
logo preferences.
This short {\it if-then-else} example also includes what is known in
programming languages as a ``variable''. A variable in programming is
quite similar to a variable in algebra. It is simply a symbol that
represents a value. Variables are used both in algebra and in
programming because it is more convenient (and more powerful) to
substitute variables for actual values in an expression.
Loops are another example of control that is available when a
programming language is used to specify the steps the computer must
take to complete an algorithm. Loops allow a given operation to be
repeated. In batch processing, this simply isn't possible without
explicitly requesting the operation as many times as you'd like it
done. Here is a comparison of the commands necessary in both batch
processing and scripting to draw five circles:
\begin{itemize}
\item Batch Processing\\
{\scriptsize
\begin{verbatim}
draw_circle (100, 50, 50)
draw_circle (200, 50, 50)
draw_circle (300, 50, 50)
draw_circle (400, 50, 50)
draw_circle (500, 50, 50)
\end{verbatim}}
\item Scripting\\
{\scriptsize
\begin{verbatim}
for (i = 1 to 5)
draw_circle (i * 100, 50, 50)
\end{verbatim}}
\end{itemize}
Script-Fu uses a programming language known as {\bf
Scheme}\footnote{Script-Fu actually uses SIOD, a small implementation
of Scheme \cite{siod}} \cite{scheme} to implement its scripting.
Scheme is a compact, but fully-featured programming language. It
affords the programmer the flexibility necessary for automatic logo
generation, without burdening him with unnecessary complexity. Logo
scripts are written in Scheme and a program called an interpreter
reads through them, evaluating each expression as it goes. This
scheme interpreter is not actually a separate program in the Script-Fu
architecture. Instead, it is part of the Script-Fu program, which
simplifies the overall architecture. The scheme interpreter is quite
small, and therefore does not add significant clutter to Script-Fu.
\subsection{Script-Fu--Management}
The final component is the Script-Fu program itself. Script-Fu is
implemented as a GIMP extension. In essence, it acts as manager and
facilitator between the scheme interpreter and GIMP. It establishes
the lines of communication and forwards messages between them. It
also presents the user with an interface for selecting which script to
run, and which parameters to run the script with. Parameters for
running a script typically include things like the typeface, the size,
the text string, and colors. After the user has selected a script and
entered the input parameters, Script-Fu formulates a command and sends
it to the scheme interpreter, which in turn begins to process the
script.
\section{Component Interaction}
The three components that comprise Script-Fu work together to generate
a logo. Their interaction is fairly straightforward and consists of
six steps:
\begin{enumerate}
\item Script-Fu presents the user with an interface allowing a
style of logo to be selected and input parameters associated with that
style to be set.
\item Once a logo is selected, Script-Fu formulates a command based on
the user inputs and sends it to the Scheme interpreter. The
interpreter begins to process the selected script.
\item The Scheme interpreter reads a command from the script,
and if it is GIMP-related, forwards it to Script-Fu. Otherwise goto
step 6.
\item If the interpreter forwarded a command, Script-Fu parses it and
reformats it so that GIMP will accept it. Script-Fu then requests
that GIMP execute the command and waits for GIMP to signal success or
failure.
\item GIMP executes the command incoming from Script-Fu, and on
success, returns any values which the command requires as outputs. On
failure, GIMP returns an error message.
\item The Scheme interpreter checks if the script has been fully
processed. If so, then the logo is finished; otherwise, goto step 3.
\end{enumerate}
\section{Net-Fu}
Script-Fu and GIMP run on UNIX workstations, which severely limit the
breadth of the user base. The users who would most benefit from the
advent of an automated graphic design utility are primarily PC users
running either Apple's MacOS or Microsoft's Windows NT and Windows 95.
Therefore, a fourth and final component is necessary to complete
Script-Fu.
\myfigone{net-fu}{6cm}{Net-Fu adds one additional component to the
Script-fu/GIMP architecture: A WWW user interface written as a {\it
Java} applet, and capable of running on any {\it Java}-equipped web browser.}
This additional component is called {\bf Net-Fu}, and serves to bridge
the gap between the UNIX-based Script-Fu and the masses. Instead of
porting Script-Fu to MacOS or Windows 95, Net-Fu solves the problem of
usability by providing an additional interface to Script-Fu's
functionality. Net-Fu is implemented as a Java applet--programs which
can be downloaded on the World Wide Web and run on any kind of
computer, from UNIX machines to Macintoshes to PCs. Java applets can
be run from within web browsers, which means that anyone with access
to the WWW (which is just about everyone these days), can use Net-Fu.
Net-Fu provides an interface similar to the one which Script-Fu
normally provides on the local UNIX machine\footnote{Refer to appendix
D for images of the Net-Fu user interface}: it allows a style of
script to be selected and then prompts the user for logo parameters
such as typeface, size, and the text string. While Script-Fu simply
takes the user input and feeds it directly to the Scheme interpreter,
Net-Fu must transmit its request to Script-Fu, which then feeds it to
the Scheme interpreter.
When Script-Fu is run, it can be instructed not to display an
interface, but instead to act as a server to which any other program
can send commands which will be processed as if they were entered by
Script-Fu's normal user-interface. If Net-Fu is the intended
interface, Script-Fu will be instructed to enter server-mode and will
then simply await commands from programs such as Net-Fu. To clarify,
here is a typical sequence of events that occur using Net-Fu:
\begin{enumerate}
\item A user in Sweden wants to create a title logo that appears to be
made from green, neon tubing and reads ``Jens' Cocktails''. The user
directs his web browser to the Net-Fu address: {\it
http://scheme.xcf.berkeley.edu/net-fu/}.
\item Jens' browser will now display a table containing the various
styles of logos available for creation through Net-Fu. Each logo style
entry in the table contains a short description of the style and a
preview.
\item Jens selects the ``Neon'' style and is subsequently presented
with a user interface which prompts him for the following inputs:
\begin{itemize}
\item {\it Text}--He enters ``Jens' Cocktails''
\item {\it Text Size}--He keeps the default value of 100 pixels
\item {\it Typeface}--He keeps the default, ``Blippo'', a font with
evenly rounded characters--quite appropriate for neon.
\item {\it Tube Color}--He selects a bright green with a hint of yellow.
\end{itemize}
\item Jens then clicks the ``Run'' button in the Net-Fu interface and
waits patiently for his logo.
\item As soon as the ``Run'' button is clicked, Net-Fu gathers all of
the information entered by Jens and opens a connection to the
Script-Fu server running on a machine in Berkeley, CA. Net-Fu then
forwards Jens' command to Script-Fu and waits until Script-Fu returns.
\item Script-Fu receives Jens' command and enters active
processing mode, where it no longer listens for commands, but instead
begins to process the Neon script to Jens' specifications. When it has
finished the logo, Script-Fu returns the location.
\item Net-Fu receives the location of the logo from Script-Fu
and directs Jens' browser there.
\item Jens claps his hands in glee, as he has created the logo of his
dreams in seconds, without an ounce of effort, and certainly without
straining his limited artistic talents.
\end{enumerate}
\section{Conclusions}
With the advent of the World Wide Web (WWW), mass communication is
available to the average individual at a fraction of its historical
price. This unprecedented development makes it possible for anyone to
advertise products, exchange information, and communicate ideas.
However, the massive volume of information which flows through the WWW
is a mixed blessing: while it does allow anyone to contribute, it also
reduces the liklihood that a particular piece of information will be
absorbed by a significant number of people. Like other more
traditional means of mass media--such as TV and radio--the content on
the WWW must be accompanied by attractive packaging to have a large
impact.
Script-Fu delivers this attractive packaging at no cost, in mere
seconds, and without requiring artistic talent. Script-Fu is capable
of delivering artwork which rivals the quality of that done by
professional graphic designers. Using Script-Fu and the WWW,
virtually anyone can advertise compellingly, and at almost no cost.
Script-Fu consists of three primary components. The first is GIMP, an
image manipulation engine which does the actual computations necessary
in creating a logo. The second is the scripting language (Scheme),
which specifies the algorithms which define the process that leads to
a logo. The third and final component is a GIMP extension called
Script-Fu, which manages the entire process of creating a logo--from
communication between the Scheme interpreter and GIMP, to a user
interface.
Net-Fu is an optional fourth component and provides an additional user
interface which is accessible to nearly everyone. It is implemented
as a Java applet and can be accessed through the World Wide Web.
Net-Fu allows anyone with a web browser to access the power of
Script-Fu.
\section{Acknowledgements}
Special thanks to Yaroslav Faybishenko for his speedy implementation
of the Net-Fu Java applet. Beyond this inadequate mention, Peter
Mattis should be recognized for his work on GIMP. The software has
come a long way in two years.
\begin{flushleft}
\begin{thebibliography}{References}
\bibitem{photoshop} Adobe Systems, Inc. Photoshop (tm) 3.0,
Computer Program, 1994.
\bibitem{foley} J. D. Foley, A. Dam, S. K. Feiner, J. F. Hughes,
\emph{Computer Graphics: Principles and Practice},
Addison-Wesley, NY, 1992.
\bibitem{GIMP} S. Kimball, P. Mattis, GNU Image Manipulation
Program (GIMP), Computer Program, 1996-1997.
\bibitem{hearn} D. Hearn, M. P. Baker,
\emph{Computer Graphics},
Prentice Hall, NJ, 1994.
\bibitem{ipv6} R. M. Hinden, ``IP Next Generation Overview'',
\emph{Communications of the ACM},
June 1996/Vol 39, No. 6.
\bibitem{scheme} H. Abelson, G. J. Sussman,
\emph{Structure and Interpretation of Computer Programs},
The MIT Press, MA, 1985.
\bibitem{siod} G. J. Carrette, Scheme In One Defun (SIOD),
Computer Program, 1996.
\end{thebibliography}
\end{flushleft}
\onecolumn
\appendix
\section{Example Scripts}
\subsection{Simple Script for HDS Logos}
{\scriptsize
\begin{verbatim}
; HIGHLIGHT-DROP-SHADOW-LOGO
; draw the specified text over a background with a drop shadow and a highlight
(define (color-highlight color)
(let ((r (car color))
(g (cadr color))
(b (caddr color)))
(set! r (+ r (* (- 255 r) 0.75)))
(set! g (+ g (* (- 255 g) 0.75)))
(set! b (+ b (* (- 255 b) 0.75)))
(list r g b)))
(define (hds-logo text size font bg-color text-color)
(let* ((img (car (gimp-image-new 256 256 RGB)))
(text-layer (car (gimp-text img -1 0 0 text 10 TRUE size PIXELS "*" font "*" "*" "*" "*")))
(width (car (gimp-drawable-width text-layer)))
(height (car (gimp-drawable-height text-layer)))
(bg-layer (car (gimp-layer-new img width height RGB_IMAGE "Background" 100 NORMAL)))
(highlight-layer (car (gimp-layer-copy text-layer TRUE)))
(shadow-layer (car (gimp-layer-new img width height RGBA_IMAGE "Shadow" 100 MULTIPLY)))
(old-fg (car (gimp-palette-get-foreground)))
(old-bg (car (gimp-palette-get-background))))
(gimp-image-undo-disable img)
(gimp-image-resize img width height 0 0)
(gimp-image-add-layer img bg-layer 1)
(gimp-image-add-layer img shadow-layer 1)
(gimp-image-add-layer img highlight-layer 1)
(gimp-palette-set-background text-color)
(gimp-layer-set-preserve-trans text-layer TRUE)
(gimp-edit-fill img text-layer)
(gimp-edit-clear img shadow-layer)
(gimp-palette-set-background (color-highlight text-color))
(gimp-layer-set-preserve-trans highlight-layer TRUE)
(gimp-edit-fill img highlight-layer)
(gimp-palette-set-background bg-color)
(gimp-drawable-fill bg-layer BG-IMAGE-FILL)
(gimp-selection-layer-alpha img text-layer)
(gimp-palette-set-background '(0 0 0))
(gimp-selection-feather img 7.5)
(gimp-edit-fill img shadow-layer)
(gimp-selection-none img)
(gimp-palette-set-foreground '(255 255 255))
(gimp-blend img text-layer FG-BG-RGB MULTIPLY RADIAL 100 20 FALSE 0 0 width height)
(gimp-layer-translate shadow-layer 3 3)
(gimp-layer-translate highlight-layer -2 -2)
(gimp-layer-set-name text-layer text)
(gimp-layer-set-name highlight-layer "Highlight")
(gimp-palette-set-background old-bg)
(gimp-palette-set-foreground old-fg)
(gimp-image-undo-enable img)
(gimp-display-new img)))
\end{verbatim}}
\subsection{Complex Script for Crystal Logos}
{\scriptsize
\begin{verbatim}
; CRYSTAL
; Create a text effect that simulates crystal
(define (set-pt a index x y)
(prog1
(aset a (* index 2) x)
(aset a (+ (* index 2) 1) y)))
(define (spline1)
(let* ((a (cons-array 18 'byte)))
(set-pt a 0 0 0)
(set-pt a 1 31 235)
(set-pt a 2 63 23)
(set-pt a 3 95 230)
(set-pt a 4 127 25)
(set-pt a 5 159 210)
(set-pt a 6 191 20)
(set-pt a 7 223 240)
(set-pt a 8 255 31)
a))
(define (crystal-brush brush-size)
(cond ((<= brush-size 5) "Circle (05)")
((<= brush-size 7) "Circle (07)")
((<= brush-size 9) "Circle (09)")
((<= brush-size 11) "Circle (11)")
((<= brush-size 13) "Circle (13)")
((<= brush-size 15) "Circle (15)")
((<= brush-size 17) "Circle (17)")
(else "Circle Fuzzy (19)")))
(define (shadows val)
(/ (* 0.96 val) 2.55))
(define (midtones val)
(/ val 2.55))
(define (highlights val)
(/ (* 1.108 val) 2.55))
(define (rval col)
(car col))
(define (gval col)
(cadr col))
(define (bval col)
(caddr col))
(define (sota-scale val scale chrome-factor)
(* (sqrt val) (* scale chrome-factor)))
(define (crystal-logo chrome-factor text size font bg-img env-map)
(let* ((img (car (gimp-image-new 256 256 GRAY)))
(back-img (car (gimp-file-load 1 bg-img bg-img)))
(back-layer (car (gimp-image-active-drawable back-img)))
(banding-img (car (gimp-file-load 1 env-map env-map)))
(banding-layer (car (gimp-image-active-drawable banding-img)))
(b-size (sota-scale size 2 chrome-factor))
(offx1 (sota-scale size 0.33 chrome-factor))
(offy1 (sota-scale size 0.25 chrome-factor))
(offx2 (sota-scale size (- 0.33) chrome-factor))
(offy2 (sota-scale size (- 0.25) chrome-factor))
(feather (sota-scale size 0.5 chrome-factor))
(blur (sota-scale size 0.5 chrome-factor))
(displace (sota-scale size 0.25 chrome-factor))
(brush-size (sota-scale size 0.5 chrome-factor))
(text-layer (car (gimp-text img -1 0 0 text b-size TRUE size PIXELS "*" font "*" "*" "*" "*")))
(width (car (gimp-drawable-width text-layer)))
(height (car (gimp-drawable-height text-layer)))
(tile-ret (plug-in-tile 1 back-img back-layer width height))
(tile-img (car tile-ret))
(tile-layer (cadr tile-ret))
(bg-layer (car (gimp-layer-copy tile-layer TRUE)))
(layer1 (car (gimp-layer-copy banding-layer TRUE)))
(layer2 (car (gimp-layer-new img width height GRAYA_IMAGE "Layer 2" 100 DIFFERENCE)))
(layer3 (car (gimp-layer-new img width height GRAYA_IMAGE "Layer 3" 100 NORMAL)))
(layer-mask 0)
(layer-mask2 0)
(disp-map 0)
(old-fg (car (gimp-palette-get-foreground)))
(old-bg (car (gimp-palette-get-background)))
(old-brush (car (gimp-brushes-get-brush))))
(gimp-image-delete banding-img)
(gimp-image-delete back-img)
(gimp-image-delete tile-img)
(gimp-image-undo-disable img)
(gimp-image-resize img width height 0 0)
(gimp-image-add-layer img layer3 0)
(gimp-image-add-layer img layer2 0)
(gimp-palette-set-background '(255 255 255))
(gimp-selection-none img)
(gimp-edit-fill img layer2)
(gimp-edit-fill img layer3)
(gimp-layer-set-visible text-layer FALSE)
(gimp-selection-layer-alpha img text-layer)
(gimp-palette-set-background '(0 0 0))
(gimp-selection-translate img offx1 offy1)
(gimp-selection-feather img feather)
(gimp-edit-fill img layer2)
(gimp-selection-translate img (* 2 offx2) (* 2 offy2))
(gimp-edit-fill img layer3)
(gimp-selection-none img)
(set! layer2 (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
(gimp-invert img layer2)
(gimp-image-add-layer img layer1 0)
(gimp-layer-scale layer1 width height FALSE)
(plug-in-gauss-iir 1 img layer1 10 TRUE TRUE)
(gimp-layer-set-opacity layer1 50)
(set! layer1 (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
(gimp-curves-spline img layer1 0 18 (spline1))
(set! layer-mask (car (gimp-layer-create-mask layer1 BLACK-MASK)))
(gimp-image-add-layer-mask img layer1 layer-mask)
(gimp-selection-layer-alpha img text-layer)
(gimp-palette-set-background '(255 255 255))
(gimp-edit-fill img layer-mask)
(set! disp-map (car (gimp-selection-save img)))
(gimp-brushes-set-brush (crystal-brush brush-size))
(gimp-palette-set-foreground '(0 0 0))
(gimp-edit-stroke img disp-map)
(gimp-selection-none img)
(plug-in-gauss-rle 1 img disp-map blur TRUE TRUE)
(gimp-levels img disp-map 0 0 255 1.0 96 255)
(if (= (car (gimp-drawable-is-rgb bg-layer)) 1)
(gimp-convert-rgb img))
(gimp-image-add-layer img bg-layer 2)
(set! layer2 (car (gimp-layer-copy bg-layer TRUE)))
(gimp-image-add-layer img layer2 1)
(plug-in-displace 1 img layer2 displace displace TRUE TRUE disp-map disp-map 0)
(set! layer-mask2 (car (gimp-layer-create-mask layer2 BLACK-MASK)))
(gimp-image-add-layer-mask img layer2 layer-mask2)
(gimp-selection-layer-alpha img text-layer)
(gimp-palette-set-background '(255 255 255))
(gimp-edit-fill img layer-mask2)
(gimp-selection-none img)
(gimp-levels img layer2 0 0 200 1.5 50 255)
(gimp-layer-set-mode layer1 OVERLAY)
(plug-in-gauss-rle 1 img text-layer blur TRUE TRUE)
(gimp-layer-set-preserve-trans text-layer TRUE)
(gimp-palette-set-background '(0 0 0))
(gimp-edit-fill img text-layer)
(gimp-layer-set-mode text-layer OVERLAY)
(gimp-layer-translate text-layer offx1 offy1)
(gimp-image-remove-channel img disp-map)
(gimp-layer-set-visible text-layer TRUE)
(gimp-layer-set-name layer1 "Crystal")
(gimp-layer-set-name layer2 "Interior")
(gimp-layer-set-name bg-layer "Background")
(gimp-layer-set-name text-layer "Shadow")
(gimp-palette-set-foreground old-fg)
(gimp-palette-set-background old-bg)
(gimp-brushes-set-brush old-brush)
(gimp-image-undo-enable img)
(gimp-display-new img)))
\end{verbatim}}
\twocolumn
\section{GIMP Extensions}
A computer application is generally a stand-alone program, whose
source code contains everything necessary for full functionality. In
this common case, adding additional features to the application
requires that the original source code be modified, recompiled, and
finally redistributed to its users. This process of introducing new
features is highly prone to programmer error, often resulting in a
host of new problems, sometimes even with pre-existing features. A
superior method for extending the functionality of an application is
through extension modules: independent applications which implement
additional features and then make them available to the main
application.
The GIMP and its extensions communicate by invoking commands from a
database of procedures. Procedures are pieces of functionality
provided by GIMP, its plug-ins, and its extensions. Procedures take
as input a list of arguments, execute based on the values of those
arguments, and finally return a list of values. There are procedures
for every piece of internal functionality in the GIMP as well as for
every plug-in written to date. In total, there are over 275
procedures stored in GIMP's ``procedural database''. The following are
examples of procedures called by the simple script from Appendix A:
\begin{itemize}
\item {\scriptsize{\bf gimp\_image\_new} {\it width, height, type}\\
Creates a new image, undisplayed with the specified extents and type.
A layer should be created and added before this image is displayed, or
subsequent calls to 'gimp\_display\_new' with this image as an argument
will fail. Layers can be created using the 'gimp\_layer\_new' commands.
They can be added to an image using the 'gimp\_image\_add\_layer'
command.\\
\bf Inputs \rm
\begin{itemize}
\item {\it width} (PDB\_INT32)--The width of the image
\item {\it height} (PDB\_INT32)--The height of the image
\item {\it type} (PDB\_INT32)--The type of image: \{ RGB (0), GRAY (1), INDEXED (2) \}
\end{itemize}
\bf Outputs \rm
\begin{itemize}
\item {\it image} (PDB\_IMAGE)--The ID of the newly created image
\end{itemize}}
\item {\scriptsize{\bf gimp\_text} {\it image, drawable, x, y, text, border, antialias, size, size\_type, foundry, family, weight, slant, set\_width, spacing}\\
This tool requires font information in the form of seven parameters:
\{size, foundry, family, weight, slant, set\_width, spacing\}. The
font size can either be specified in units of pixels or points, and
the appropriate metric is specified using the size\_type argument. The
x and y parameters together control the placement of the new text by
specifying the upper left corner of the text bounding box. If the
antialias parameter is non-zero, the generated text will blend more
smoothly with underlying layers. This option requires more time and
memory to compute than non-antialiased text; the resulting floating
selection or layer, however, will require the same amount of memory
with or without antialiasing. If the specified drawable parameter is
valid, the text will be created as a floating selection attached to
the drawable. If the drawable parameter is not valid (-1), the text
will appear as a new layer. Finally, a border can be specified around
the final rendered text. The border is measured in pixels.\\
\bf Inputs \rm
\begin{itemize}
\item {\it image} (PDB\_IMAGE)--The image
\item {\it drawable} (PDB\_DRAWABLE)--The affected drawable: (-1 for a new text layer)
\item {\it x} (PDB\_FLOAT)--The x coordinate for the left side of text bounding box
\item {\it y} (PDB\_FLOAT)--The y coordinate for the top of text bounding box
\item {\it text} (PDB\_STRING)--The text to generate
\item {\it border} (PDB\_INT32)--The size of the border: border >= 0
\item {\it antialias} (PDB\_INT32)--Generate antialiased text
\item {\it size} (PDB\_FLOAT)--The size of text in either pixels or points
\item {\it size\_type} (PDB\_INT32)--The units of the specified size: \{ PIXELS (0), POINTS (1) \}
\item {\it foundry} (PDB\_STRING)--The font foundry, "*" for any
\item {\it family} (PDB\_STRING)--The font family, "*" for any
\item {\it weight} (PDB\_STRING)--The font weight, "*" for any
\item {\it slant} (PDB\_STRING)--The font slant, "*" for any
\item {\it set\_width} (PDB\_STRING)--The font set-width parameter, "*" for any
\item {\it spacing} (PDB\_STRING)--The font spacing, "*" for any
\end{itemize}
\bf Outputs \rm
\begin{itemize}
\item {\it text\_layer} (PDB\_LAYER)--The new text layer
\end{itemize}}
\item {\scriptsize{\bf gimp\_blend} {\it image, drawable, blend\_mode, paint\_mode, gradient\_type, opacity, offset, repeat, x1, y1, x2, y2}\\
This tool requires information on the paint application mode, the
blend mode, and the gradient type. It creates the specified variety
of blend using the starting and ending coordinates as defined for each
gradient type.\\
\bf Inputs \rm
\begin{itemize}
\item {\it image} (PDB\_IMAGE)--The image
\item {\it drawable} (PDB\_DRAWABLE)--The affected drawable
\item {\it blend\_mode} (PDB\_INT32)--The type of blend: \{ FG-BG-RGB (0), FG-BG-HSV (1), FG-TRANS (2), CUSTOM (3) \}
\item {\it paint\_mode} (PDB\_INT32)--The paint application mode: \{ NORMAL (0), DISSOLVE (1), BEHIND (2), MULTIPLY (3), SCREEN (4), OVERLAY (5) DIFFERENCE (6), ADDITION (7), SUBTRACT (8), DARKEN-ONLY (9), LIGHTEN-ONLY (10), HUE (11), SATURATION (12), COLOR (13), VALUE (14) \}
\item {\it gradient\_type} (PDB\_INT32)--The type of gradient: \{ LINEAR (0), BILINEAR (1), RADIAL (2), SQUARE (3), CONICAL-SYMMETRIC (4), CONICAL-ASYMMETRIC (5), SHAPEBURST-ANGULAR (6), SHAPEBURST-SPHERICAL (7), SHAPEBURST-DIMPLED (8) \}
\item {\it opacity} (PDB\_FLOAT)--The opacity of the final blend (0 <= opacity <= 100)
\item {\it offset} (PDB\_FLOAT)--Offset relates to the starting and ending coordinates specified for the blend. This parameter is mode depndent (0 <= offset)
\item {\it repeat} (PDB\_INT32)--Repeat the gradient indefinitely along the direction vector
\item {\it x1} (PDB\_FLOAT)--The x coordinate of this blend's starting point
\item {\it y1} (PDB\_FLOAT)--The y coordinate of this blend's starting point
\item {\it x2} (PDB\_FLOAT)--The x coordinate of this blend's ending point
\item {\it y2} (PDB\_FLOAT)--The y coordinate of this blend's ending point
\end{itemize}}
\end{itemize}
\onecolumn
\section{Script-Fu Logos}
Plates 1-4 are example outputs of Script-Fu scripts:
\begin{itemize}
\item {\bf Carve-It}
\begin{itemize}
\item {\bf Image}:
http://scheme.xcf.berkeley.edu/net-fu/images/plates1-2.jpg
\item {\bf Script}:
http://scheme.xcf.berkeley.edu/net-fu/scripts/carve.scm
\item {\bf Net-Fu Logo}:
http://scheme.xcf.berkeley.edu/net-fu/carve.html
\end{itemize}
\item {\bf Starscape Nova}
\begin{itemize}
\item {\bf Image}:
http://scheme.xcf.berkeley.edu/net-fu/images/plates1-2.jpg
\item {\bf Script}:
http://scheme.xcf.berkeley.edu/net-fu/scripts/starscape.scm
\item {\bf Net-Fu Logo}:
http://scheme.xcf.berkeley.edu/net-fu/starscape.html
\end{itemize}
\item {\bf Chrome}
\begin{itemize}
\item {\bf Image}:
http://scheme.xcf.berkeley.edu/net-fu/images/plates3-4.jpg
\item {\bf Script}:
http://scheme.xcf.berkeley.edu/net-fu/scripts/chrome2.scm
\item {\bf Net-Fu Logo}:
http://scheme.xcf.berkeley.edu/net-fu/chrome2.html
\end{itemize}
\item {\bf Crystal/Gel}
\begin{itemize}
\item {\bf Image}:
http://scheme.xcf.berkeley.edu/net-fu/images/plates3-4.jpg
\item {\bf Script}:
http://scheme.xcf.berkeley.edu/net-fu/scripts/crystal.scm
\item {\bf Net-Fu Logo}:
http://scheme.xcf.berkeley.edu/net-fu/crystal.html
\end{itemize}
\end{itemize}
\section{Net-Fu WWW Interface}
{\bf http://scheme.xcf.berkeley.edu/net-fu/}
\end{document}

File diff suppressed because it is too large Load Diff

View File

@ -1,309 +0,0 @@
\documentclass[12pt]{article}
\usepackage{times}
\let\slash=/
\catcode`\/=\active
\def/{\futurelet\next\slashswitch}
\def\slashswitch{\ifx\next/\let\next=\udblslash\else\let\next=\uslash\fi
\next}
\def\uslash{\slash\penalty\exhyphenpenalty}
\def\udblslash/{\slash\slash\penalty\exhyphenpenalty}
\def\url{\begingroup\tt}
\def\endurl{\endgroup}
\def\gimp{{\sc gimp}}
\def\gnu{{\sc gnu}}
\def\gpl{{\sc gpl}}
\newcommand{\FIXME}[1]{\emph{*** FIXME: #1 ***}}
\begin{document}
\title{GNU Image Manipulation Program\\
Technology White Paper}
\date{}
\maketitle
\part{Introduction}
The {\bf G}NU\footnote{Please see \url http://www.gnu.org \endurl for
information on the \gnu\ Project.} {\bf I}mage {\bf M}anipulation {\bf
P}rogram (\gimp) is a powerful tool for the preparation and
manipulation of digital images. The \gimp\ provides the user with a
wide variety of image manipulation, painting, processing, and
rendering tools. The key to the \gimp's power lies in its flexible
core and easily extensible design. The \gimp's open design and
extensible architecture make for a very powerful end product which can
continue to be extended to meet the needs of the photo compositor,
image retoucher, web graphics designer, or digital illustrator for a
very long time.
The \gimp's extensible plug-in architecture allows for image
manipulation procedures and other functionality to be easily added
without requiring any change to the application core. A plug-in can
provide functionality as simple as rotating an image, or as
complicated as rendering iterated function system fractals. There are
nearly 150 plug-ins available in version 1.0, and more are sure to
follow.
The plug-in architecture also allows the \gimp\ to support a wide
variety of file formats. File operations are implemented by special
\emph{file plug-ins}, allowing additional file formats to be added
without modification to the core. File formats supported in version
1.0 include the popular GIF and JPEG standards, as well as PNG, TIFF,
XPM, SGI, PCX, and Windows BMP.
An innovative tile management system allows the \gimp\ to be used to
edit images much larger than can be stored in system memory; the
user's available disk space is the only real limit to the size of the
image a user can edit.
While the \gimp's primary emphasis is on image manipulation, it also
offers a complete set of painting tools for use in image creation.
Version 1.0 offers pencil, paintbrush, eraser, airbrush, and cloning
tools, as well as a variable-strength convolver. All of these tools
(except the eraser) can be operated in any of the \gimp's 15 painting
modes. A powerful gradient generator, with a very versatile custom
gradient editor, makes colored blends easy.
A full battery of image manipulators are available, including
rotation, scaling, translation, color, brightness, and contrast
adjustment, and gamma correction. In addition, a great many other
useful transformations are available as plug-ins, and the ease of
extensibility here means that new capabilities are being added all the
time.
Finally, the most impressive feature of the \gimp\ is that it is
available under the terms of the GNU General Public License
(\gpl).\footnote{Please see \url http://www.gnu.org/copyleft/gpl.html
\endurl for the full text of the \gpl.} The entire source code is
freely available and distributed. This openness has fostered a very
active development community and large user base, out of which a
superior product has arisen.
\part{Core architecture}
\section{Images}
The basic operating element of any digital image editor is the
\emph{image}. In the \gimp, images are constructed out of
\emph{layers}, which are stacked on top of on another through a
process called \emph{composition} to produce a \emph{projection},
which is what is displayed to the user. In addition to having any
number of layers, a \gimp\ image may have one or more user-defined
\emph{channels}, as well as a \emph{selection mask}. Channels and
selection masks are discussed later. Together, these three objects
(layers, channels, and selection masks) along with \emph{layer masks}
(also to be discussed later) are known as \emph{drawables}, because
the drawing tools work on all of them and they are the only internal
structures into which the program can paint to.\footnote{There is
presently no way to draw directly onto a selection mask using the user
interface. However, the user can create an invisible channel, paint
there, and ask the program to turn the channel into a selection mask.}
Images in the \gimp\ are typed, and there are presently three types of
image: RGB, grayscale, and indexed. The type of image determines the
representation of the pixels in the image. In an RGB image, each
pixel of the composited image is represented by a 24-bit RGB tuple;
all 16 million possible colors are potentially available in the
composited image. Grayscale images are monochromatic, and each pixel
is a single 8-bit gray value, yielding 256 shades of gray. Indexed
images represent each pixel as an index into a color table, each entry
of which is a 24-bit RGB tuple. The type of all layers within an
image must be compatible with the image type.
\section{Drawables}
A \emph{drawable} is a linear array of pixel data; however, the
contents of a drawable need not necessarily be used solely for
rendering as pixel data (for example, selection masks are drawables
internal to the program, and they are not directly ``paintable'' by the
user).
Each drawable contains from one to four data channels (not to be
confused with the channels spoken of elsewhere in this document),
depending on the type of the drawable. Each data channel is eight
bits deep.
There are six types of drawables (see table \ref{tab:drawables}).
\begin{table}
\centering
\begin{tabular}{lcl}
Type & Data channels & Contents of channels \\
\hline
RGB & 3 & red, green, blue \\
RGB w/ alpha & 4 & red, green, blue, alpha \\
Grayscale & 1 & intensity \\
Grayscale w/ alpha & 2 & intensity, alpha \\
Indexed & 1 & color index \\
Indexed w/ alpha & 2 & color index, alpha \\
\end{tabular}
\caption{Drawable Types}
\label{tab:drawables}
\end{table}
\subsection{Layers}
Each \emph{layer} is a drawable. Layers of any drawable type are
possible, but the type of a layer must be compatible with the type of
the image of which it is a part. A layer type is compatible with an
image type if the two are the same, or if the layer type is the same
as the image type with an added alpha channel (for example, a
grayscale image cannot contain an RGB layer). Every layer is part of
exactly one image.
The user may selectively make any layer of an invisible; invisible
layers do not contribute to the composition process.
\subsubsection{Layer masks}
Optionally, any layer with an alpha channel may have an added
\emph{layer mask}. The layer mask is a separate channel which is
multiplied into that layer's drawable alpha channel whenever that
layer contributes to a projection. The user can elect to temporarily
disable this effect of a layer mask for editing purposes, or cause the
layer mask to be substituted for the main drawable; these effects are
mainly for convenience in editing. The user can also merge the layer
mask back into the layer's main drawable, or discard it.
\subsection{Channels}
The term ``channels'' actually refers to three different things in the
\gimp: layer masks, selection masks, and custom channels. In all
three cases, a channel consists of an array of 8-bit values; the
interpretation of these values varies depending on the type of
channel.
In addition to these channel types, each image also has either one or
three ``virtual'' channels (one for grayscale and indexed images,
three for RGB). These virtual channels (sometimes called ``color
channels'') are merely a convenience to the user and are not drawables
by themselves. These virtual channels can be made visible or
invisible, and for images where there is more than one virtual
channel, each can be made visible or invisible independently of the
others. Normally all the virtual channels are active, and all
painting operations modify all three the channels. When a virtual
channel is invisible, both layer composition and layer painting
operations ignore that channel. This is useful in two situations:
first, when the user wants to see only a subset of the color channels
(RGB); and second, when the user wants to paint on the image but only
modify a subset of the channels.
\section{Tiles}
\section{Pixel Regions}
\section{The Paint Core}
\subsection{Brushes}
All brushes in gimp are implemented as greyscale bitmap masks. They
are 8-bit greyscale and provide 256 levels of grey.
The format for the Brush file is the .gbr format (Gimp brush). Gimp
includes a file plugin to load and save this format, so brushes can be
created and edited using GIMP itself.
These brushes can be used by any of the paint tools (paintbrush,
airbrush, clone, etc).
Brushes are completely customizable and are not limited to simple
pre-made shapes. Any greyscale image can conceivibly used as a brush.
\section{Selections}
\section{Tools}
\section{xcf format}
\subsection{Gradient tool}
The gradient tool lets the user easily create color gradients. It
supports several gradient types: linear, bilinear, radial, square,
conical, and the special ``shapeburst'' mode, which makes the gradient
follow the shape of the active selection.
Normally, the blend tool creates color gradients between the current
foreground and background colors. It supports four blending modes:
linear interpolation between the RGB components, linear interpolation
between the HSV versions of the colors (for rainbow effects), blending
from the foreground color to transparent, and the very powerful custom
gradient feature.
Gradients are calculated with respect to a direction vector. The user
can specify whether the gradient is to be rendered normally (only once
along the direction vector), or repeated along the direction vector
using a sawtooth or triangular wave pattern.
A unique feature of the \gimp's gradient tool is its support for
user-defined, custom color gradients. The \gimp\ sports a
fully-featured color gradient editor that lets the user create color
gradients with an arbitrary number of color transitions.
A custom gradient is represented internally as a list of contiguous,
non overlapping segments that define a partition of the range $[0, 1]$.
Each segment has the following properties:
\begin{itemize}
\item Left and right colors that blend smoothly inside the segment.
\item An off-center midpoint, which can be used to bias the color
blend to the left or to the right.
\item A blending function, which can be linear, curved (with an
exponent), sinuosidal, or spherical (increasing and decreasing).
\item A coloring type, which can be RGB interpolation, clockwise or
couterclockwise HSV interpolation.
\end{itemize}
The user can drag the segments' endpoints left and right. Segments
can be inserted and deleted at any time. The gradient editor provides
several useful functions for manipulating segments (split, flip,
replicate) that make creation of custom gradients easy and convenient.
The color segments support full transparency information, making for
even more flexible gradients.
To avoid sampling artifacts (the ``jaggies''), the gradient rendering
engine supports adaptive supersampling with customizable threshold and
recursion depth parameters. With adaptive supersampling even the most
complex custom gradients will be rendered smoothly without
artifacting.
\FIXME{drawing or screenshot?}
\part{Plug-ins and the PDB}
\section{Procedures}
The \gimp\ core consists of 215\footnote{In version 0.99.16. This
number tends to go up with time.} procedures which operate on images
in a great variety of ways.
The procedures register themselves in the Procedural Database (or
PDB). All plugins have access to all the procedures in the PDB, and
most of the scripting extentions provide full access to the PDB. The
PDB is basically an API for programming high level internal \gimp\
functions and procedures.
\FIXME{General overview}
\end{document}