swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swarm-Support] Problems generating png from pixmap


From: Rex Oleson
Subject: [Swarm-Support] Problems generating png from pixmap
Date: Tue, 11 Feb 2003 16:41:35 GMT

OK I have looked through the example, faq and news group but I still can't seem 
to get it to work.

I am running redhat 8.0
and this is the code that should be doing the job, but it crashes right after 
it tries to save the first png and the image file is created but does not 
contain the image.

- takeSnapshotOfRoot
{
   char filename[40];
   unsigned timeNow;
   id pixId;

   timeNow = getCurrentTime();

   // Create a file name that contains the simulation time:
   sprintf( filename,"zmovie.rootwindow.%04d.png", timeNow );
   printf( "time is %04d", timeNow );

   if( timeNow > 5 )
   {
      // Write the bitmap snapshot to disk:
      pixId = [Pixmap createBegin: self];
      [pixId setWidget: nil];
      [pixId setDecorationsFlag: YES];
      [pixId save: filename];

      // Release the memory used by the Pixmap object:
      [pixId drop];
   }

   return self;
} 


any suggestions would be greatly appreciated thank you.




________________________________________________________________
Sign Up for Juno Platinum Internet Access Today
Only $9.95 per month!
Visit www.juno.com


reply via email to

[Prev in Thread] Current Thread [Next in Thread]