User Tools

Site Tools


fr:imgsave

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

fr:imgsave [2016/01/01 22:44]
fr:imgsave [2020/02/28 10:46] (current)
Line 1: Line 1:
 +===== ImgSave =====
 +
 +==== Format ====
 +**imgsave** //filename//\\
 +**imgsave** //filename//, //type//\\
 +**imgsave** ( //filename// )\\
 +**imgsave** ( //filename//, //type// )
 +
 +==== Description ====
 +Sauvegarde l'écran de sortie graphique actuel dans un fichier image.\\
 +Par défaut l'image est enregistrée au format Portable Networks Graphics (PNG). Il est possible de spécifier le format de l'image avec le paramètre //type//, les types valides sont : "BMP", "JPG", "JPEG", or "PNG".\\
 +Quelquefois les images sont sauvegardées avec un fond noir (là où rien n'a été dessiné. C'est à cause de l'instruction [[CLG|CLG]], qui défini la couleur de fond à "clear" (transparent). Et quand l'image est enregistrée la transparence est changée en noir. Pour éviter cela remplacer l'instruction CLG par le bout de code suivant:
 +<code>
 +color white
 +rect 0, 0, graphwidth, graphheight
 +</code>
 +
 +==== Exemple ====
 +<code>
 +color white
 +rect 0, 0, graphwidth, graphheight
 +for t = 0 to 100
 +   color rand()*256, rand()* 256, rand()*256
 +   rect rand()*graphwidth, rand()*graphheight,rand()*graphwidth, rand()*graphheight
 +next t
 +imgsave "testimgsave1.png"
 +imgsave "testimgsave2.jpg", "jpg"
 +</code>
 +
 +==== Voir Aussi ====
 +[[ImgLoad|ImgLoad]]
 +
 +==== Disponible à partir de la version ==== 
 +0.9.6.45
  
fr/imgsave.txt · Last modified: 2020/02/28 10:46 (external edit)