Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!husc6!mit-eddie!ll-xn!ames!ucbcad!ucbvax!INGRES.BERKELEY.EDU!hatcher From: hatcher@INGRES.BERKELEY.EDU (Doug Merritt) Newsgroups: comp.sys.amiga Subject: Dpaint II brushes Message-ID: <8706280142.AA22412@ingres.Berkeley.EDU> Date: Sat, 27-Jun-87 21:42:03 EDT Article-I.D.: ingres.8706280142.AA22412 Posted: Sat Jun 27 21:42:03 1987 Date-Received: Sun, 28-Jun-87 05:04:40 EDT Sender: daemon@ucbvax.BERKELEY.EDU Organization: Intergalactic Hackers's Headquarters Lines: 80 Summary: Same thing as any IFF ILBM brush [Dear LineEater, Please note my new address: ucbvax!unisoft!certes!doug] In article <1286@crash.CTS.COM> billk@pnet01.CTS.COM (Bill Kelly) writes: >Would someone be kind enough to post some information about how to read in a >DPaint II brush? I am interested in reading one in and converting it into an >Image structure in my program. DPaint II brushes are the same thing as IFF ILBM images, which are documented fairly thoroughly in the RKM (see for instance page B-43 of Appendix B of RKM:Exec, Addison Wesley edition, and pg B-75 for "ilbm.h" and pg B-71 for "iff.h"). They are often smaller than the whole screen, which sometimes confuses ilbm viewing programs, but I've sometimes been able to view them with such programs. Hopefully Bryce's "uShow" works on them but I haven't tried it yet. Quick overview of ILBM (pictures *and* brushes): char ID[4] = "FORM"; ULONG Size; struct Data { char ID[4] = "ILBM"; struct properties { char ID[4] = "BMHD"; /* BitMapHeaDer */ ULONG Size; struct bmhd { UWORD w, h; /* pixel width/height */ WORD x,y; /* pixel position */ UBYTE nPlanes; /* # planes */ UBYTE mask; UBYTE Compression; UBYTE pad; UWORD transparentColor; UBYTE xAspect, yAspect; WORD pageWidth, pageHeight; }; struct ColorMap { char ID[4] = "CMAP"; ULONG Size; struct { UBYTE red, green, blue; } } struct CommodoreAMiGa { char ID[4] = "CAMG"; ULONG Size = 1; struct { LONG ViewportMode; } } struct ColorRange { char ID[4] = "CRNG"; ULONG Size; struct { WORD pad1; WORD CycleRate; WORD active; /* cycle? */ UBYTE low, high; /* range */ } } } struct BODY { struct { char PixRow[ NPLANES ][ WIDTH ]; char MaskPlane[ WIDTH ]; } scanline [HEIGHT]; } } The above is not complete, nor do I guarantee it to be correct. Compression complicates the BODY, and each chunk is padded to an even length (so that no chunk starts on an odd address). The pad is not included in chunk sizes. Reading the documentation is important to get the other details (and to discover where my deviations from reality are in the above). Doug Merritt Please note my new address: ucbvax!unisoft!certes!doug