Changeset 133 for trunk/SRC/ToBeReviewed/IMAGE/animgif.pro
- Timestamp:
- 07/07/06 11:57:27 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/IMAGE/animgif.pro
r114 r133 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:animgif6 5 ; 7 ; PURPOSE:construire une animation gif 6 ; @file_comments 7 ; Build a gif animation 8 8 ; 9 ; CATEGORY:pour faire des dessins animes9 ; @categories Animated drawings. 10 10 ; 11 ; CALLING SEQUENCE:animgif, 'toto.gif' 11 ; @param toto.gif {in}{required} It is the name of the gif file containing the animation. 12 ; Comment: this file is placed in the directory defined by iodir. 12 13 ; 13 ; INPUTS:toto.gif: c''est le nom du fichier gif contenant 14 ; l''animation. Rq ce fichier est place dans le repertoire definit par 15 ; iodir. 14 ; @uses common.pro 16 15 ; 17 ; KEYWORD PARAMETERS: 18 ; 19 ; OUTPUTS: 20 ; 21 ; COMMON BLOCKS: 22 ; common.pro 23 ; 24 ; SIDE EFFECTS:on utilise le Z buffer pour aller plus vite!. 25 ; donc si on plante ds animgif il faut faire: 16 ; @restrictions We use the Z buffer to go faster!. 17 ; So, if it failed in animgif, you have to do: 26 18 ; IDL> device, /close 27 19 ; IDL> set_plot, 'x' 28 20 ; IDL> retall 29 21 ; 30 ; RESTRICTIONS: si on veut supprimer le @common,31 ; il faut definir a la main la taille de l''image (les32 ; variables xsize et ysize) ainsi queiodir.22 ; @restrictions If we want to delete the @common, 23 ; we have to define manually the picture's size 24 ; (variables xsize and ysize) just as iodir. 33 25 ; 34 ; EXAMPLE: 26 ; @history Guillaume Roullet (grlod@ipsl.jussieu.fr) 27 ; Sebastien Masson (smasson@lodyc.jussieu.fr) 28 ; 30/4/1999 35 29 ; 36 ; MODIFICATION HISTORY: Guillaume Roullet (grlod@ipsl.jussieu.fr) 37 ; Sebastien Masson (smasson@lodyc.jussieu.fr) 38 ; 30/4/1999 30 ; @version $Id$ 31 ; 39 32 ;- 40 33 ;------------------------------------------------------------ … … 47 40 @common 48 41 ; 49 ; recupere la palette de couleur et la place dans rouge, vert, bleu42 ; It recuperates the color palette and put it in red, green, blue. 50 43 ; 51 44 tvlct, rouge,vert,bleu,/get 52 45 ; 53 ; complete la palette courante sur 256 couleurs46 ; It completes the current palette on 256 colors. 54 47 ; 55 48 red = [rouge, replicate(255, 256-n_elements(rouge))] … … 57 50 blue = [bleu, replicate(255, 256-n_elements(rouge))] 58 51 ; 59 ; bascule sur le z device, permettant de creer l''image sans 60 ; l''afficher 52 ; It rocks on the z device, allowing to create the picture without display it. 61 53 thisOS = !VERSION.OS_FAMILY 62 54 thisOS = STRMID(thisOS, 0, 3) 63 55 thisOS = STRUPCASE(thisOS) 64 56 set_plot, 'z' 65 ; taille de l''image (en nombre de pixel:57 ; size of the picture (in pixel): 66 58 xsize = 30*(min(page_size, max = ma)*key_portrait + ma*(1-key_portrait)) 67 59 ysize = 30*(min(page_size, max = ma)*(1-key_portrait) + ma*key_portrait) 68 60 device, set_resolution = [xsize, ysize] 69 61 ; 70 ; commencement du fichier gif. ecriture d''une image vide62 ; Beginning of the gif file. Writing of an empty picture. 71 63 ; 72 64 reinitplt … … 76 68 ; 77 69 ;---------------------------------------------------------------- 78 ; debut de la partie a changer70 ; Beggining of the part we want to change. 79 71 ;---------------------------------------------------------------- 80 72 ; 81 ; boucle de creation de l''image73 ; Loop of picture's creation. 82 74 ; 83 75 calen = TIMEGEN(366, START=JULDAY(1,1,2000)) … … 107 99 ; plt, norme(nlec('unsurf', date, 'RE3'), nlec('vnsurf', date, 'RE3')), 0, 1.2, int = .1, /noerase 108 100 ; 109 ; Ecriture de l''image dans le fichier .gif101 ; Writing of the picture in the file .gif. 110 102 ; 111 103 write_gif,iodir+nomfic,tvrd(),red, green, blue, /multiple 112 104 ENDFOR 113 105 ;---------------------------------------------------------------- 114 ; fin de la partie a changer106 ; End of the part we want to change. 115 107 ;---------------------------------------------------------------- 116 108 ; 117 ; fermeture du fichier109 ; Closing of the file. 118 110 write_gif,iodir+nomfic,/close 119 ; rebascule en mode terminal X120 device, /close111 ; Rerock on terminal X mode. 112 ; device, /close 121 113 CASE thisOS of 122 114 'MAC': SET_PLOT, thisOS
Note: See TracChangeset
for help on using the changeset viewer.