Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!mcsun!ukc!abekrd!ecmwf!ecmwf!mab From: mab@ecmwf.co.uk (Baudouin Raoult) Newsgroups: comp.sys.mac.programmer Subject: Re: Writing PICS files.... Message-ID: <1991Mar25.140703.19907@ecmwf.co.uk> Date: 25 Mar 91 14:07:03 GMT References: Sender: usenet@ecmwf.co.uk (NEWS deafult user) Reply-To: mab@ecmwf.co.uk (Baudouin Raoult) Organization: ECMWF Lines: 33 In article , smd@media-lab.media.mit.edu (Steven Drucker) writes: > > I have an application that can generate 3d animations but now > I'd like to save out the frames as a PICS file so that other > viewing programs can use it. The only problem is, I don't know > how to do that. > I think that a PICS file is just a series of PICT resources > but whenever I've tried to open the resource file and then use > addresource for the picthandle that I've created, my program crashes. > Does anybody know the proper way to create a PICS file (or even > create PICT resources in a file)? (I've been using THINK C 4.0 but > any example code would be very helpful) > Thanks, > -Steve Drucker You must be calling KillPicture some time after AddResouce. If you call AddResource, the handle added *belongs* to the Resource Manager ( it will be disposed if you close the resource file). Write: AddResource(Handle(myPic),.....); WriteResource(Handle(myPic)); UpdateResFile(CurrResFile); DetachResource(Handle(myPic)); /* get control back of your picture */ KillPicture(myPic); -- --------------------------------------------------- Baudouin Raoult. European Center for Medium Range Weather Forecast Reading, UK ---------------------------------------------------