[q-lang-cvs] q/modules/magick/examples magicktest.q,1.7,1.8
Brought to you by:
agraef
From: <ag...@us...> - 2003-12-30 14:02:16
|
Update of /cvsroot/q-lang/q/modules/magick/examples In directory sc8-pr-cvs1:/tmp/cvs-serv5632 Modified Files: magicktest.q Log Message: added new example functions Index: magicktest.q =================================================================== RCS file: /cvsroot/q-lang/q/modules/magick/examples/magicktest.q,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** magicktest.q 28 Dec 2003 11:36:32 -0000 1.7 --- magicktest.q 30 Dec 2003 14:02:12 -0000 1.8 *************** *** 133,136 **** --- 133,170 ---- /****************************************************************************/ + /* gallery IMGS SCENES: Show a thumbnail gallery of the given images SCENES (a + list of image indexes) in the given list of images IMGS. Example: + + ==> def IMGS = read_image "jurannessic_176x104.mpg" () + + ==> gallery IMGS [20,120,160,220,420,595,650,715,760,795] */ + + gallery IMGS SCENES + + = ifelse (islist IMG) (map display IMG) (display IMG) + + where IMGS = map (IMGS!) SCENES, LABELS = map (sprintf "#%d") SCENES, + _ = zipwith (flip set_image_attr "label") IMGS LABELS, + IMG = montage IMGS ("Gallery","5x4","120x120",(),10,true), + _ = zipwith (flip set_image_attr "label") IMGS (map (cst ()) LABELS); + + /****************************************************************************/ + + /* slideshow IMGS SCENES: Show a slide show of the given images SCENES in the + given list of images IMGS, using morph to blend between the different + images. Example: + + ==> def IMGS = read_image "jurannessic_176x104.mpg" () + + ==> slideshow IMGS [795,20,120,160,220,420,595,650,715,760] */ + + slideshow IMGS SCENES + + = animate IMGS + + where IMGS = map (IMGS!) SCENES, IMGS = morph (append IMGS (hd IMGS)) 50; + + /****************************************************************************/ + /* Display driver. Assume DirectX on Windows, X11 everywhere else. */ |