Name |
save()保存 |
||||
Examples |
line(20, 20, 80, 80); // Saves a TIFF file named “diagonal.tif” save(“diagonal.tif”); // Saves a TARGA file named “cross.tga” line(80, 20, 20, 80); save(“cross.tga”); |
||||
Description |
Saves an image from the display window. Append a file extension to the name of the file, to indicate the file format to be used: either TIFF (.tif), TARGA (.tga), JPEG (.jpg), or PNG (.png). If no extension is included in the filename, the image will save in TIFF format and .tif will be added to the name. These files are saved to the sketch’s folder, which may be opened by selecting “Show sketch folder” from the “Sketch” menu. Alternatively, the files can be saved to any location on the computer by using an absolute path (something that starts with / on Unix and Linux, or a drive letter on Windows). All images saved from the main drawing window will be opaque. To save images without a background, use createGraphics(). 从显示窗口中保存图像。将文件扩展名追加到文件的名称, 以指示要使用的文件格式: tiff (. tif)、塔尔加 (. tga)、jpeg (. jpg) 或 png (. png)。如果文件名中没有包含扩展名, 则图像将以 tiff 格式保存, 并将. tif 添加到名称中。这些文件将保存到草绘的文件夹中, 可以通过从 “草绘” 菜单中选择 “显示草图文件夹” 来打开。或者, 可以使用绝对路径 (在 unix 和 linux 上启动的东西, 或 windows 上的驱动器号) 将这些文件保存到计算机上的任何位置。
从主绘图窗口保存的所有图像将不透明。要保存没有背景的图像, 请使用 createGraphics ()。 |
||||
Syntax |
save(filename) |
||||
Parameters |
|
||||
Returns |
void |
||||
Related |
saveFrame() |
- 本文固定链接: http://iprocessing.cn/2017/08/01/save保存/
- 转载请注明: 卡萨布兰卡 于 Processing编程艺术 发表