Xref: news2.mv.net comp.os.msdos.djgpp:5132 From: brian AT piglet DOT cam DOT cornell DOT edu (Brian Kelley) Newsgroups: comp.os.msdos.djgpp Subject: Re: Allegro's Grabber Date: 18 Jun 1996 10:53:15 -0400 Organization: Cornell University Lines: 57 Sender: bpk1 AT cornell DOT edu (Verified) Message-ID: References: <835052153snz AT flag DOT demon DOT co DOT uk> <4q5cum$8r3 AT doc DOT zippo DOT com> NNTP-Posting-Host: piglet.cam.cornell.edu In-reply-to: nkopp@grfn.org's message of 17 Jun 1996 21:56:54 -0700 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp >>>>> "nkopp" == nkopp writes: nkopp> In article <835052153snz AT flag DOT demon DOT co DOT uk>, Ben says... >> Hi All, >> >> I just designed a few nice images to be used as sprites in the >> Allegro library. >> >> I saved the screen as a 320 x 200 256 colour PCX file. However, >> upon loading it in to the grabber program, when trying to grab an >> image from the PCX file, the dotted box seems to be on a grid, not >> allowing me to cut my images out properly. Is there any way to fix >> this? I looked at the code for the grabber routine, but couldn't >> find a way around this. >> >> Any ideas would be appreciated. >> >> -- Cheers, >> >> Ben -=Look for "Moo-Juice" on the IRC=- >> nkopp> The grabber doesn't work on a cut & paste system. It works on a nkopp> "grab" system. That was new to me, too, so it took some getting nkopp> used to. You need to save each sprite as a separate PCX file. nkopp> Then, in grabber, create a new bitmap or RLE item and then load nkopp> one of the PCX files. Next choose "grab". This will copy the nkopp> PCX to your bitmap. You may need to adjust the x/y sizes of the nkopp> bitmap first. You'll also want to grab the pallete. Hope this nkopp> helps. One thing that helped me a lot, is after loading a PCX file, I slapped in some code to display the X/Y size of the image so I could set the bitmap size right. Perhaps this should be an addition to Allegro 2.1? Anyway, here are the steps to capturing/grabbing a bitmap (same as above, but hopefully a little more pedantic): 1) Select Read PCX and choose file 2) Select New Object ==> Bitmap 3) Alter w= h= to the size of the PCX file or to the size of your desired bitmap 4) Select Grab and move the rectangle to select the desired region of the bitmap. (2b is where I would display the size of the PCX file read in) nkopp> -Nathan Kopp (Impulse) nkopp AT grfn DOT org nkopp> http://www.grfn.org/~nkopp/ nkopp> http://www.grfn.org/~nkopp/djgpp.shtml -- Brian Kelley : 357 Rhodes Hall brian AT ee DOT cornell DOT edu : Cornell University (607) 255-0963 : Ithaca, N.Y. 14850