Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!usc!cs.utexas.edu!rutgers!cbmvax!vu-vlsi!swatsun!jackiw From: jackiw@cs.swarthmore.edu (Nick Jackiw) Newsgroups: comp.sys.mac.programmer Subject: Re: Any bitmap editors available? Message-ID: Date: 14 Dec 89 22:32:47 GMT References: <4854@eagle.wesleyan.edu> Reply-To: jackiw@cs.swarthmore.edu (Nick Jackiw) Organization: Visual Geometry Project, Swarthmore College, PA Lines: 42 rcook@eagle.wesleyan.edu writes: > I know that MacPaint and SuperPaint are very powerful bitmap editors. Is > there some way to coerce their files into a resource I could use to store > bitmaps efficiently in my programs? If worse comes to worst, I can always > write my own bitmap editor, but I hate writing utilities. > > Thanks, > Randall Cook If you cut or copy a bitmap from either of these programs onto the Clipboard, enter ResEdit, and Paste, you'll get a PICT resource. Create your off- screen bitmap to the appropriate size, SetPort(..) to it, pre-erase it, and then DrawPicture(....). There is minimal overhead; a single bitmap PICT is probably only 20-30 bytes longer than the bit-image of the pict. Alternately, for my private use I've written a program called BitMap Capture, which takes an PICT from the clipboard (whether originally Bitmap or not), constructs a bitmap from it, and replaces the PICT with a 'cBM1' resource ("captured-BitMap#1"--my creation) which is the uncompressed bit image, suitably for being addressed by aBit.baseAddr. Uncompressed bit images make applications large quickly, however. It wouldn't be difficult to write a post-processing function which would create a cBM2 (captured-Bitmap; compressed) from a cBM1; and an equivalent pre-processing cBM2->cBM1 decompressor. (I'm envisaging a single call to PackBits() per resource, here.) Let me [jackiw@cs.swarthmore.edu] know if you'd like to be sent a copy of Bitmap Capture. It has the nice feature of determining for you the bounds and rowBytes of the image as well. Nick ---- -- "'I have seen too often your filthy teeth snap with range and your august countenance, covered with the fungus of time, blush like a flaming coal because of some microscopic futility that man had commited, to be able to pause longer before the signpost of that silly hypothesis.'" -Maldoror