Path: utzoo!attcan!uunet!jarthur!usc!samsung!emory!ogicse!zephyr.ens.tek.com!tekcrl!scott From: scott@tekcrl.LABS.TEK.COM (Scott Huddleston) Newsgroups: comp.graphics Subject: Re: shrinking a bitmap by 3 Message-ID: <6543@tekcrl.LABS.TEK.COM> Date: 26 Jul 90 07:47:01 GMT References: <32071@cup.portal.com> Reply-To: scott@tekcrl.LABS.TEK.COM (Scott Huddleston) Distribution: na Organization: Tektronix, Inc., Beaverton, OR. Lines: 13 In article <32071@cup.portal.com> DeadHead@cup.portal.com (Bruce M Ong) writes: .>I am writing a program that would shrink a bi-level bitmap by three. .>... My original approach is to .>take 3 bits at a time and if there are two black bits, then the resultant .>bit will be set, otherwise the resultant bit is a white bit. The image is .>not shrunk vertically. However, this is tooo slow... Sounds like you want table lookup. Grab 12 bits at a time and index into a table giving the 4 shrunk bits. Precompute your table for all possible 12-bit combinations. -- Scott Huddleston scott@crl.labs.tek.com