User Tools

Site Tools


nl:imgsave

Differences

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

Link to this comparison view

nl:imgsave [2016/01/01 22:46]
nl:imgsave [2020/02/28 10:46] (current)
Line 1: Line 1:
 +===== ImgSave =====
  
 +==== Formaat ====
 +**imgsave** //bestandsnaam//\\
 +**imgsave** //bestandsnaam//, //type//\\
 +**imgsave** ( //bestandsnaam// )\\
 +**imgsave** ( //bestandsnaam//, //type// )
 +
 +==== Beschrijving ====
 +Met deze functie bewaar je hetgeen in het grafishc venster bestaat in een bestand op je computer in je [[currentdir]], je werkfolder.
 +
 +Je kan het bestand bewaren als 
 +  * BMP
 +  * JPG
 +  * JPEG
 +  * PNG
 +
 +PNG is het standaard formaat als je niets specifieert.
 +==== Opmerking ==== 
 +Soms zal het beeld zwarte vakken bevatten, als het in het scherm niets getekend was. De reden is dat de [[clg]] opdracht eigenlijk het grafisch venster vult met de kelur 'transparant'. Transparant of doorzichtig wordt zwart gemaakt als het grafisch venster wordt weggeschreven naar het bestand. 
 +
 +Gebruik dan het volgende als alternatief voor [[clg]]
 +<code basic4gl>
 +color white
 +rect 0, 0, graphwidth, graphheight
 +</code>
 +
 +==== Voorbeeld ====
 +<code basic4gl>
 +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 "voorbeeldbestand.png"
 +imgsave "voorbeeldbestand2.jpg", "jpg"
 +</code>
 +
 +==== Zie ook====
 +[[ImgLoad|ImgLoad]]
 +
 +==== Nieuw vanaf ==== 
 +0.9.6.45
 +
 +----
 +[[imgload|vorige]] | [[a_real_dali|Tekenen en kleuren]] | [[getslice|volgende]]
nl/imgsave.txt ยท Last modified: 2020/02/28 10:46 (external edit)