[comp.sys.mac.programmer] PackBits routine

bjb@pyrshadow.pyramid.com (Bruce Beare) (12/28/89)

I'm modifying the xloadimage program (comp.sources.x) to be able to 
directly display macpaint images on the X terminal. The macpaint format 
seems to be straight forward.  It does, however, call the 'PackBits' 
function. Packbits seems to do some sort of a run-length encoding, but I 
don't believe that it is completely specified in IM. I've found no TNs 
that describe exactly what it does.

Has anyone come across this little bit of trivia?

-Bruce Beare
 bjb@pyrshadow.pyramid.com

andyp@gvgpvd.GVG.TEK.COM (Andy Peterman) (12/28/89)

In article <96197@pyramid.pyramid.com> bjb@pyrshadow.pyramid.com (Bruce Beare) writes:
>........  Packbits seems to do some sort of a run-length encoding, but I 
>don't believe that it is completely specified in IM. I've found no TNs 
>that describe exactly what it does.
>
>Has anyone come across this little bit of trivia?

Trivia indeed!  Check out TN #171.  It ONLY took me about 10 minutes to
find this myself, having remembered that I saw this description
somewhere.  It seems that this Technote isn't reffered to by any of the
indexes under the word "Packbits".  Strange...

	Andy

bjb@pyrshadow.pyramid.com (Bruce Beare) (12/29/89)

In article <1455@gvgpvd.GVG.TEK.COM> andyp@gvgpvd.GVG.TEK.COM (Andy 
Peterman) writes:
> In article <96197@pyramid.pyramid.com> bjb@pyrshadow.pyramid.com (Bruce 
Beare) writes:
> >........  Packbits seems to do some sort of a run-length encoding, but 
I 
> >don't believe that it is completely specified in IM. I've found no TNs 
> >that describe exactly what it does.
> >
> >Has anyone come across this little bit of trivia?
> 
> Trivia indeed!  Check out TN #171.  It ONLY took me about 10 minutes to
> find this myself, having remembered that I saw this description
> somewhere.  It seems that this Technote isn't reffered to by any of the
> indexes under the word "Packbits".  Strange...
> 
>         Andy

Mea Culpa. I tried to use the 'Tech Notes' stack -- for the first time. I 
checked the index for 'packbits' and did not find it. It never occured to 
me to look under the 'misc' category and find the '_packbits' routine. Thanks
to the several responders who pointed me to #171.

Gee, that was obvious, wasn't it.

-Bruce

unhd (Paul A. Sand) (12/29/89)

In article <1455@gvgpvd.GVG.TEK.COM> andyp@gvgpvd.GVG.TEK.COM (Andy Peterman) writes:
[On finding PackBits format]
>Trivia indeed!  Check out TN #171.  It ONLY took me about 10 minutes to
>find this myself, having remembered that I saw this description
>somewhere.  It seems that this Technote isn't reffered to by any of the
>indexes under the word "Packbits".  Strange...

It's there, under "_PackBits"; which, is of course, far far away from
PackBits. Perhaps this would be a good one-liner:

"If you can't find it under 'foo' in the index, check '_foo'".
-- 
-- Paul A. Sand       | For this unavoidable excess I take full responsibility,
-- U of New Hampshire | trusting that readers will sort out what is valuable
-- uunet!unhd!pas     | from what is not, and that those who find nothing of
--  pas@unh.edu       | value will forgive and forget. (Robert Grudin)