www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/10/07/08:34:02

From: Jason Green <news AT jgreen4 DOT fsnet DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Pointer/array understanding?
Date: Sun, 07 Oct 2001 13:20:07 +0100
Lines: 16
Message-ID: <b0i0stsf1liketrhm0cdtujme9kvce6t71@4ax.com>
References: <34539894 DOT 0110051212 DOT 1cb9a48e AT posting DOT google DOT com>
NNTP-Posting-Host: modem-155.iodine.dialup.pol.co.uk
Mime-Version: 1.0
X-Trace: news5.svr.pol.co.uk 1002457274 26819 62.136.44.155 (7 Oct 2001 12:21:14 GMT)
NNTP-Posting-Date: 7 Oct 2001 12:21:14 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Newsreader: Forte Agent 1.7/32.534
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

pouzzler AT aol DOT com (pouzzler) wrote:

> I'm trying to load/draw a bitmap from a file (PLEASE don't answer
> "Allegro")

> How can I read ALL the bits, then draw them.

Dr Dobbs have a couple of articles on the BMP format; one includes source
code to read a .bmp file into an array.  Look at 94/09 and 95/03, IIRC
the article was titled "When is a Standard Not a Standard", refering to
Microsoft's practice of changing the format with each version of Windows.

> How can I make those arrays, not knowing their size in the first
> place?

Use malloc() to dynamically allocate the memory at run-time.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019