DASaveImageDataToFile

Image handling, Direct access functionality

Description

Saves an image in an image list to a file on disk. The type of image file depends on the type of the image. The DAGetImageIntProperty function can be used to determine the image type

Syntax

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);

Parameters

FileHandleA handle returned by the DAOpenFile, DAOpenFileReadOnly or DAOpenFromStream functions
ImageListIDA value returned by the DAGetPageImageList function
ImageIndexThe index of the image. The first image in the list has an index of 1. Use the DAGetImageListCount function to determine the number of images in the list
ImageFileNameThe path and file name of the file to create to store the image data in

Return values

Returns 1 when the image data has been written. Returns 0 when the file handle or image list is invalid, the image has no data, or the file cannot be written.