Article View: rec.games.programmer
Article #345Re: Getimage() question?
From: Marc de Boer (I88)
Date: Tue, 14 Apr 1992 14:26
Date: Tue, 14 Apr 1992 14:26
40 lines
1864 bytes
1864 bytes
kwong@isis.cs.du.edu (ken wong) writes:
>Can anyone explain how getimage() read its data, I was wondering if a
>image existed 64k, does that mean we will have to use huge pointer instead
>of far pointer, (far pointer will wrap-around). Svgabg31.zip mention that
>it can read image over 64k, does that mean it takes a far pointer as a
>correction: a huge pointer as a parameter? Any help would be appreciated.
As a related question:
Can getimage() be skipped? Say I have a small picture. I draw in onto
the screen. Read it with getimage(). Now I want to save it in a file,
or by some other means store it. Obviously, I want to have it ready
for putimage() later without having to draw it.
I tried a few things. First, make the bitmap an int* and try to read the
image int by int.
Shorthand:
int *bitmap;
bitmap=malloc(size);
getimage(bitmap);
for (i=1;i<((int)size/(sizeof(int)));i++,bitmap++)
printf("%d ",*bitmap);
Doesn't work. I get the first few int's fine, but then rubbish.
It looks like I get just the first row.
Help me out here!
Thanks in advance!
Marc
(mdeboer@fwi.uva.nl)
--
--------------------------------------------------------------------
Thanx for you input! Marc de Boer
(/dev/null loved it!) (mdeboer@fwi.uva.nl)
--------------------------------------------------------------------
Technical Details
Message-ID:
<1992Apr14.142638.9159@fwi.uva.nl>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!fwi.uva.nl!gene.fwi.uva.nl!mdeboerReferences:
<1992Apr13.155805.3887@mnemosyne.cs.du.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!fwi.uva.nl!gene.fwi.uva.nl!mdeboer From: mdeboer@fwi.uva.nl (Marc de Boer (I88)) Newsgroups: rec.games.programmer Subject: Re: Getimage() question? Message-ID: <1992Apr14.142638.9159@fwi.uva.nl> Date: 14 Apr 92 14:26:38 GMT References: <1992Apr13.155805.3887@mnemosyne.cs.du.edu> Sender: news@fwi.uva.nl Organization: FWI, University of Amsterdam Lines: 40 Nntp-Posting-Host: larry.fwi.uva.nl