User Tools

Site Tools


es:imgsave

Differences

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

Link to this comparison view

es:imgsave [2016/01/01 22:43]
es:imgsave [2020/02/28 10:46] (current)
Line 1: Line 1:
 +===== ImgSave =====
 +
 +==== Formato ====
 +**imgsave** //NombredeArchivo//\\
 +**imgsave** //NombredeArchivo//, //tipo//\\
 +**imgsave** ( //NombredeArchivo// )\\
 +**imgsave** ( //NombredeArchivo//, //tipo// )
 +
 +==== Descripción ====
 +Guarda el área de gráficos actual en un archivo de imagen.\\
 +Por defecto, la imagen se guarda en un archivo con formato Portable Networks Graphics (PNG). Opcionalmente, puede especificarse el tipo de imagen como "BMP", "JPG", "JPEG", o "PNG".
 +
 +En ocasiones las imágenes se guardan con "relleno negro" donde la pantalla no estaba dibujada. Esto es debido a que la instrucción [[CLG|CLG]] establece como color del fondo el color "clear" (transparente). Cuando la imagen se guarda la transparencia cambia a negro. Puede cambiarse la instrucción CLG del siguiente modo:
 +<code>
 +color white
 +rect 0, 0, graphwidth, graphheight
 +</code>
 +
 +==== Ejemplo ====
 +<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>
 +
 +==== Ver también ====
 +[[ImgLoad|ImgLoad]]
 +
 +==== Disponible desde la versión ==== 
 +0.9.6.45
  
es/imgsave.txt · Last modified: 2020/02/28 10:46 (external edit)