On Tue, Aug 29, 2000 at 10:00:07AM -0400, Charles Rezsonya wrote:
> hello,  is it possible to have a bitmap on the handheld and convert that to
> a pcx or simular type file?  even if its not actually in that format on the
> unit 'tis ok.  i'm looking to capture an image and send it out on the
> serial.  thx

Yes, it is fairly easy, but you need to convert it to whatever the
destination format is.  The following does pnm files (see
www.wotsit.org or any unix/linux system or the Gimp).

    i = 32767;
    t = DmNewRecord(dbR, &i, 3212);
      bp = buf;
      *bp++='P';
      *bp++='4';
      *bp++='\n';
      *bp++='1';
      *bp++='6';
      *bp++='0';
      *bp++=' ';
      *bp++=' ';
      *bp++='1';
      *bp++='6';
      *bp++='0';
      *bp='\n';

      DmWrite(MemHandleLock(t), 0,  buf,12);
    DmWrite(MemHandleLock(t), 12, 
WinGetWindowPointer(FrmGetWindowHandle(FrmGetActiveForm()))->displayAddrV20, 3200);
    MemHandleUnlock(t);
    DmReleaseRecord(dbR, i, true);
 
(This is from one of my screen capture hacks).

It just happens that the internal screen and pnm formats coincide.

But the above is the general idea.  Prepare a header, copy and
compress or format the actual image data for the destination format,
then store or send.

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to