Equinox Online Help - Language Reference - A to Z
ExportPicture |
|
---|---|
Applies to | |
Syntax | ExportPicture PictureItem, FileExpression ExportPicture PictureItem, "CLIPBOARD", [hClip] ExportPicture PictureItem, "FILE", hFile ExportPicture PictureItem, "MEMORY", hMem |
Action | [Statement] Exports a picture from a picture field. |
Scope | Usable anywhere. |
Notes | This statement Exports an image from a specified picture field. PictureItem is the name of the picture field in the current record. There are four forms of the ExportPicture statement, corresponding to the four destinations to which you can write an image:
If you export the image to a file path, FileExpression is a string and identifies the image file name. The file-type must match the type that was originally assigned to the picture field. If you do not specify a path for the file, Equinox writes it into whichever directory is current at the time. In order to export the file to the server, prepend "SERVER:" (in any case) to the FileExpression. This prefix is ignored by the single user version. If you export a "BMP" format image to a file path, a standard file header (referred to as a BITMAPFILEHEADER in the Windows SDK documentation) is added to the beginning of the extracted file. All other formats and destinations are extracted without the header. If you export the image to the Windows clipboard, you can access the clipboard handle using hClip. Equinox creates an object of type CF_DIB, which can be pasted into other Windows applications. If the image being extracted is not already in "BMP" format, it is converted. If you wish to export the image to an open file handle, you must supply the handle using hFile, having first obtained it using FileOpen in one of the binary (random) modes. If you wish to export the image to an open memory handle, you must supply the handle using hMem, having first obtained it using GlobalAlloc. The memory handle is allocated by Equinox and freed by the developer. |
Category | Pictures |
See Also | AssignPicture, ErasePicture, ExtractPicture, ImportPicture |
Example | The following examples assume a picture field PicField, character workareas HandleType(3), MemType(3) and a numeric workarea MemHandle(8,0) |* File Operations *| |