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

Re: [MacPerl] Opening PICT files with MacPerl



At 15.21 -0500 1998.11.30, Brian McNett wrote:
>How do I skip the first 512
>bytes of the PICT file?

Using the script in MPPE around p. 207 (1.Drawing.3.pl on the CD-ROM),
change lines 39-40 to:

  my($p, $r);
#  $p = GetPicture(128);
  {
    local $/;  # slurp mode /
    open(PICT, "Bourque:Picture 1") or die $!;
    $p = PicHandle->new(substr(<PICT>, 512));
  }

This will use the PICT in the path in lieu of resource ID 128.

There are probably other ways you can use with read() or something, but I
like this one.

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch