KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: SAVE PICTURE TO FILE vs. WRITE PICTURE FILE
PRODUCT: 4D | VERSION: 6.7 | PLATFORM: Mac & Win
Published On: February 23, 2001
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

In version 6.7, 4D offers a new command called WRITE PICTURE FILE. This command saves the picture passed in the picture parameter in the defined format to disk, similar to the command SAVE PICTURE TO FILE. However, the command SAVE PICTURE TO FILE requires an additional 4 lines of code to perform the task.

vRef:=Create document("";"PICT")
If (OK=1)
SAVE PICTURE TO FILE(vRef;vPict)
CLOSE DOCUMENT(vRef)
End if

We can perform the same task with a single line of code by using the command WRITE PICTURE FILE.

WRITE PICTURE FILE("";vPict;"PICT")