Export Snapshot PNG Workaround
dave at looktowindward.com
Wed Mar 21 10:11:14 CDT 2007
Thought I'd share the workaround.
With a lot of help from Jacque I have managed to figure out a work
around. There were actually three separate problems and acted
together to make it hard to figure out what the problem is.
The following statement will cause an error after an unknown number
of files have been written.
export snapshot from group "GroupCounter" to file myFileName as PNG
The work around is to use this form instead:
put the windowID of this stack into myWindowID
put the rect of "myGroup" into myRect
export snapshot from rect myRect of window myWindowID to file
myFileName as PNG
This stops the error occurring and allows you to move on to the next
Using the export snapshot command under the IDE results in memory
being leaked on each image exported.
The work around is to Compile the App into a Standalone and test
using a smaller number of files.
RunRev does not garbage collect until after a handler returns.
The work around is to have two handers and use the timed send command
process a smaller number of images at time.
Once you put all three of these together, you can write lots of images.
Thanks a lot to everyone that helped on this.
All the Best
More information about the use-livecode