DASaveImageDataToFile
影像處理、直接存取功能
描述
把影像清單中的影像存成磁碟上的檔案。影像檔類型取決於影像本身的類型,可用 DAGetImageIntProperty 函式判斷影像類型
語法
Delphi
Function TPDFlib.DASaveImageDataToFile(FileHandle, ImageListID, ImageIndex: Integer; Const ImageFileName: WideString): Integer;
ActiveX
Function PDFlib::DASaveImageDataToFile(FileHandle As Long, ImageListID As Long, ImageIndex As Long, ImageFileName As String) As Long
DLL
int DLDASaveImageDataToFile(int InstanceID, int FileHandle, int ImageListID, int ImageIndex, const wchar_t* ImageFileName);
int DLDASaveImageDataToFileA(int InstanceID, int FileHandle, int ImageListID, int ImageIndex, const char* ImageFileName);
參數
| FileHandle | 由 DAOpenFile、DAOpenFileReadOnly 或 DAOpenFromStream 函式傳回的控制代碼 |
|---|---|
| ImageListID | 由 DAGetPageImageList 函式傳回的值 |
| ImageIndex | 影像的索引。清單中第一張影像的索引為 1。可用 DAGetImageListCount 函式判斷清單中的影像數量。 |
| ImageFileName | 要建立以存放影像資料的檔案路徑與檔名。 |
傳回值
影像資料寫入成功後傳回 1。檔案控制代碼或影像清單無效、影像沒有資料或無法寫入檔案時傳回 0。