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

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