Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1.chuqui 4/7/84; site apple.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!whuxlm!harpo!decvax!ittvax!dcdwest!sdcsvax!sdcrdcf!hplabs!nsc!voder!apple!johan From: johan@apple.UUCP (Johan Strandberg) Newsgroups: net.micro.mac Subject: Re: QuickDraw routine CopyBits (problems with) Message-ID: <10450@apple.UUCP> Date: Sat, 15-Dec-84 18:37:10 EST Article-I.D.: apple.10450 Posted: Sat Dec 15 18:37:10 1984 Date-Received: Tue, 18-Dec-84 03:23:59 EST References:Reply-To: johan@apple.UUCP (Johan Strandberg) Organization: Apple Education Research Group, Cupertino CA Lines: 27 Summary: rowBytes should be *even* In article you write: >This example causes "System error 02", Address error. >It appears CopyBits cannot copy from a BitImage with >rowBytes=1. When I changed my BitImage to 16*8 pixels, >rowBytes=2, everything functioned ok. > >Does anyone know where the problem is, with me or with >QuickDraw?? The problem is that rowBytes *must* be an even number remember that the bus is 16bits and it would be *higly* ineficient to manipulate a byte at a time. To quote the Inside Macintosh (QuickDraw; page 12): The baseAddr field is a pointer to the begining of the the bit image in memory and the rowBytes field is the number of bytes in each row of the image. Both of these should always be even: a bitMap should always begin on a word boundary and contain an integral number of words in each row. _________________________Computare necesse est!______________________ Johan Strandberg Apple Computer Education Research Group [ERG] {mtxinu,dual,nsc,voder,idi,ios,sun}!apple!johan