Part of the Samples Website. 8/16/97.

samples.basicStuff.readPictureFile

«Reads a picture file into Frontier.root
«it prompts you for a file to open
«and then creates the picture at scratchpad.picture
«and opens the window
local (f, picturedata)
if not file.getFileDialog ("Choose a picture file", @f, 'PICT')
return
file.open (f)
file.read (f, 512) «skip the first 512 bytes of the file
picturedata = file.read (f, infinity) «read the rest of the file into local
file.close (f)
setBinaryType (picturedata, 'PICT')
pict.PICTToPicture (@picturedata, @scratchpad.picture)
edit (@scratchpad.picture)


This page was last built on Sat, Aug 16, 1997 at 6:39:20 PM. You can download the current set of sample scripts from our FTP site. Dave