首页 > 文档 > save()保存
2017
08-01

save()保存

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

filename

String: any sequence of letters and numbers

 

任何字母和数字序列

Returns

void

Related

saveFrame()
createGraphics()



最后编辑:
作者:卡萨布兰卡
这个作者貌似有点懒,什么都没有留下。

留下一个回复

你的email不会被公开。