🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: rec.games.programmer
3 messages
3 total messages Started by ken wong Mon, 13 Apr 1992 15:58
Getimage() question?
#339
Author: ken wong
Date: Mon, 13 Apr 1992 15:58
6 lines
770 bytes
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.
Re: Getimage() question?
#345
Author: Marc de Boer (I88)
Date: Tue, 14 Apr 1992 14:26
40 lines
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)
--------------------------------------------------------------------
Re: Getimage() question?
#352
Author: Paul Frattaroli [DCS]
Date: Wed, 15 Apr 1992 12:36
32 lines
1571 bytes
In article <1992Apr14.142638.9159@fwi.uva.nl> mdeboer@fwi.uva.nl (Marc de Boer (I88)) writes:

[stuff deleted]

>Doesn't work. I get the first few int's fine, but then rubbish.
>It looks like I get just the first row.

Don't forget, putimage() expects an extra 2 ints at the beginning
of the bitmap which tells it how big the image is.  Or is it 3?
One for bits per pixel too.

>
>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)
>--------------------------------------------------------------------

....Paul

-- 
         Paul "vi joe" Frattaroli - Department of Computing Services                      University of Waterloo  Waterloo, Ontario Canada  N2L-3G1
  < pfratar@watshine.UWaterloo.CA >       < pfratar@watserv1.UWaterloo.CA >
          [129.97.128.171]                         [129.97.129.140]
          NeXT Mail: < pfratar@magpie.UWaterloo.CA > [129.97.32.42]
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads