User Tools

Site Tools


pt:imgsave

Differences

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

Link to this comparison view

pt:imgsave [2016/01/01 22:48]
pt:imgsave [2020/02/28 10:46] (current)
Line 1: Line 1:
 +===== ImgSave =====
 +
 +==== Formato ====
 +**imgsave** //filename//\\
 +**imgsave** //filename//, //type//\\
 +**imgsave** ( //filename// )\\
 +**imgsave** ( //filename//, //type// )
 +
 +==== Descrição ====
 +Guarda a imagem da janela grafica para um ficheiro de imagem.\\
 +Por defeito é assumido o formato (PNG). Como opção há também a possibilidade de gravar em "BMP", "JPG", "JPEG".
 +
 +Por vezes as imagens serão guardadas como "fundo negro" onde a janela não foi desenhada.Isto deve-se à instrução [[CLG|CLG]] establece como cor de fundo a cor "clear" (transparente).Quando a imagem é guardada o transparente passa a negro. Pode alterar-se a instrução clg do seguinte modo:
 +
 +<code>
 +color white
 +rect 0, 0, graphwidth, graphheight
 +</code>
 +
 +==== Exemplo ====
 +<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 também ====
 +[[ImgLoad|ImgLoad]]
 +
 +==== Disponivel desde ==== 
 +0.9.6.45
  
pt/imgsave.txt · Last modified: 2020/02/28 10:46 (external edit)