RE: no image with pfuSaveImage on iR

New Message Reply Date view Thread view Subject view Author view

BOCCARA Michael (MICHAEL.BOCCARA++at++siege.aerospatiale.fr)
Thu, 23 Jan 1997 17:01:26 +0100


      Hi Thomas,

     I had exactly the same problem, not on an iR IRIX 6.2 with performer 2.1,
     but with an Onyx RE2 IRIX 5.3 with Performer 2.0.1.
     The image was not black but totally aberrated, with only the red canal, when
     a chunk of image appears. Bref, pfuSaveImage didn't work.

     BUT, I found an alternative : I use a system call to the unix command
     "scrsave"

     The only problem is that you better not cover a part of your Performer
     pipewindow with another window, because my method is to make a snapshot of a
     part of the screen cropped according to the dimensions of the pipewindow.
     Apart from this the result is OK (a rgb image file in the current directory).
     I dont think that this method will depend on the SGI platform.

     void
     snapImage(void)
     <
       ostrstream ost;
       static int count = 0;
       pfPipe* cpipe = Shared->chan->getPipe();
       int id = pfGetId(cpipe)*10 + count++;

       int ox, oy, sx, sy;
       Shared->pw->getCurScreenOriginSize(&ox, &oy, &sx, &sy);

       ost << "scrsave " << "Photo." << id << ".rgb "
           << ox << " " << (ox+sx) << " " << oy << " " << (oy+sy) << " ;";
        
       pfNotify(PFNFY_ALWAYS, PFNFY_PRINT, "Saving pipe %d image : %s?n",
         pfGetId(cpipe), ost.str());
       //
       // NO MORE !!!
       /*
         pfuSaveImage(ost.str(), 0, 0,
         Shared->mouse.winSizeX,
         Shared->mouse.winSizeY,
         0);
       */
        
       //
       // BUT :
       //
        
       system(ost.str());

       pfNotify(PFNFY_ALWAYS, PFNFY_PRINT, "Done?n");
>

===================================List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:54:27 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.