[alt.msdos.programmer] TurboC getimage

miguelr@cbnewse.ATT.COM (miguel.a.rivera) (04/13/90)

Hi everybody,

I am having problems with the imagesize() function in TurboC. The problem
is that when I use this function the size of the image that the function
return is smaller than the actual size of memory needed to store the
image. After get the size needed, I use malloc() to allocate memory to store 
the image. When I execute getimage() using the pointer returned by malloc as
a buffer, it overwrite some of my memory (and some times CRASH my machine).
Those functions are used for graphic mode. Actually, I am using an EGA card.
Did anybody have the same problem?

Thanks in advance,

Miguel A. Rivera

bobmon@iuvax.cs.indiana.edu (RAMontante) (04/14/90)

The doco indicates that imagesize() can only identify a block of
(64K - 1) or fewer bytes.  I wouldn't be surprised (but I don't know)
to find that a full EGA image is bigger than 64K.

You may have to manipulate your image in more than one chunk.