| [3553] | 1 | ##########################################################
 | 
|---|
 | 2 |   Module d'interface SOPHYA/piapp avec ImageMagick pour 
 | 
|---|
 | 3 |   manipulation d'images jpeg/gif...
 | 
|---|
 | 4 |   (C) LAL-IN2P3/CNRS & Univ. Paris Sud (11)
 | 
|---|
 | 5 |   (C) IRFU - CEA   
 | 
|---|
 | 6 |                          R. Ansari - 2008
 | 
|---|
 | 7 | ##########################################################
 | 
|---|
 | 8 | 
 | 
|---|
 | 9 | 1/ Compilation/Installation 
 | 
|---|
 | 10 |   - Installer ImageMagick (C++) - Voir http://www.imagemagick.org/Magick++/
 | 
|---|
 | 11 |   - Verifier que sophya est installe et accessible (var.env $SOPHYABASE)
 | 
|---|
 | 12 |        (Voir http://www.sophya.org )
 | 
|---|
 | 13 |   - Modifier les chemins d'acces et liste des librairies ImageMagick dans 
 | 
|---|
 | 14 |   le fichier makefile
 | 
|---|
 | 15 |   - Compiler (make)     
 | 
|---|
 | 16 |   
 | 
|---|
 | 17 | 2/ Ce module contient des executables et un module chargeable pour piapp
 | 
|---|
 | 18 |   (Par defaut ds $SOPHYABASE/exe et $SOPHYABASE/slb) 
 | 
|---|
 | 19 |   Les fichiers PI-RGB correspondent aux objets PIPixRGBArray (module PI)
 | 
|---|
 | 20 |   - img2rgb : Conversion de fichier image (jpeg, gif...) en fichier PI-RGB 
 | 
|---|
 | 21 |   - rgb2img : Conversion de fichier PI-RGB en fichier image (jpeg,gif ...)
 | 
|---|
 | 22 |   - animrgbs : Conversion d'une sequence de fichier PI-RGB en GIF anime
 | 
|---|
 | 23 |   - Module imgmagmod.so qui peut être charge dans (s)piapp :
 | 
|---|
 | 24 |       piapp>  loadmodule $SOPHYABASE/slb/imgmagmod.so imgmagmod
 | 
|---|
 | 25 |     Les commandes suivantes sont ajoutees a (s)piapp (groupe ImageMagick)
 | 
|---|
 | 26 |       readphoto , writephoto , pirgb_rdphoto , pirgb_wrphoto 
 | 
|---|
 | 27 |       wdg2imgfile , win2imgfile
 | 
|---|
 | 28 |     Les fichiers image lus sont representes dans piapp par des objets de 
 | 
|---|
 | 29 |     la classe ImgMagObj. 
 | 
|---|
 | 30 |     On peut utiliser la commande disp sur ces objets :
 | 
|---|
 | 31 |       piapp> readphoto toto.jpg
 | 
|---|
 | 32 |       piapp> disp toto 
 | 
|---|
 | 33 |       piapp> disp toto 'zoomx2 rgb4096cm'
 | 
|---|
 | 34 |       piapp> disp toto 'zoom/2 lut=rgb,10,250 rgb32768cm'
 | 
|---|
 | 35 |       piapp> disp toto 'monochrome grey128'
 | 
|---|
 | 36 |       piapp> disp toto 'monochrome colrj128'
 | 
|---|
 | 37 |     On peut aussi faire des traces d'expressions (plot2d n/pl ...)
 | 
|---|
 | 38 |     Les variables suivantes sont disponibles pour chaque pixel de l'image :
 | 
|---|
 | 39 |       x,y,i,j,r,g,b,I
 | 
|---|
 | 40 |       i=x , j=y , composantes RGB  r , g , b    intensite I 
 | 
|---|
 | 41 |       
 | 
|---|
 | 42 | 3/ script tanim.pic 
 | 
|---|
 | 43 |   Creation d'une sequence de fichiers PI-RGB (tanim0.rgb ... tanim36.rgb), 
 | 
|---|
 | 44 |   permettant la creation d'une animation (mini-film)
 | 
|---|
 | 45 |   - Executer le script ds (s)piapp 
 | 
|---|
 | 46 |   - Creer un gif anime avec la commande animrgbs :
 | 
|---|
 | 47 |   csh>  animrgbs tanim.gif tanim0.rgb tanim1.rgb tanim2.rgb ... tanim73.rgb
 | 
|---|
 | 48 |   
 | 
|---|
 | 49 |              
 | 
|---|
 | 50 |     
 | 
|---|
 | 51 |      | 
|---|