使用 SaveImage() 时如何 select 文件类型

How to select the type of file when using SaveImage()

我发现 SaveImage() 命令使用了在正常 DM 操作期间 selected 的最后一种格式。我假设这个选项在 GobalInfo 标签的某处被 selected。拜托,有人能告诉我当我使用 SaveImage() 时我必须将哪个标签修改为 select dm4 格式吗?

'SaveImage()' is just a convenience wrapper. It is generally not the Image which is saved to file, but an ImageDocument which can contain one ore more images. The latest DigitalMicograph help documentation is more detailed about loading/saving than previous ones, so I'm just copy-pasting the according passages below:

例如将最前面显示的图片(文档)存储为DM图片,您可以使用:

string name = "C:\TempImg"
string handler = "Gatan 3 Format"
ImageDocument doc = GetFrontImageDocument()
doc.ImageDocumentSaveToFile( handler, name )

而且您始终可以从任何图像中获取 ImageDocument,使用:

string handler = "Gatan 3 Format"
image img := RealImage("Test - not yet shown", 4, 100, 100 )
string name = "C:\" + img.GetName()
ImageDocument doc = img.ImageGetOrCreateImageDocument()
doc.ImageDocumentSaveToFile( handler, name )