Article View: comp.os.msdos.programmer
Article #65Re: Borland C graphic format
From: Travis Cobbs
Date: Sat, 31 Oct 1992 04:40
Date: Sat, 31 Oct 1992 04:40
37 lines
2284 bytes
2284 bytes
In article <iga.720269805@dagobert> iga@rob.cs.tu-bs.de (Ingo Galleske) writes: > > > To all Borland C 2.0 programmers, > >I want to use the graphic routine "putimage" of the Borland >graphic library to insert my own pictures (.LBM-format) into >my program. I don't have any information about this >"bitmap"-format, so I have two questions: > >(1) Where are information about the Borland graphic format? > The Borland graphic format is just raw binary data. The first 6 bytes are header info. I can't remember exactly, but it is one of the following: Byte 0-1: integer representing width Byte 2-3: integer representing height Byte 4-5: integer??? (Usually 0 for me. Don't know what it does.) or Byte 0-1: integer??? (Usually 0 for me. Don't know what it does.) Byte 2-3: integer representing width Byte 4-5: integer representing height The rest is just raw data. In 16 color mode, it rounds each ROW to the nearest byte. I haven't checked if the first 4 bits or the 2nd 4 bits represent the first pixel, but I would imagine that it is the 1st 4. So (Assuming the first option above) (in hex): 04 02 00 FF 12 03 40 is a bitmap 4 wide by 2 tall with pixel colors of (in decimal): 15 15 01 02 00 03 04 00 Hope this helps. +-----------------------------------+------------------------------------------+ | Travis Cobbs | When you have to kill a man, it costs | | tcobbs@nike.calpoly.edu | nothing to be polite. | | tcobbs@morpheus.calpoly.edu | --Winston Churchill, On formal | | tcobbs@polyslo.csc.calpoly.edu | declarations of war | +-----------------------------------+------------------------------------------+
Technical Details
Message-ID:
<1992Oct31.044030.165111@zeus.calpoly.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!pipex!bnr.co.uk!bnrgate!nrcnet0!cunews!torn!cs.utexas.edu!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!sun-barr!olivea!charnel!rat!zeus!tcobbsReferences:
<iga.720269805@dagobert>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!bnr.co.uk!bnrgate!nrcnet0!cunews!torn!cs.utexas.edu!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!sun-barr!olivea!charnel!rat!zeus!tcobbs From: tcobbs@zeus.calpoly.edu (Travis Cobbs) Newsgroups: comp.os.msdos.programmer Subject: Re: Borland C graphic format Keywords: Borland C Message-ID: <1992Oct31.044030.165111@zeus.calpoly.edu> Date: 31 Oct 92 04:40:30 GMT References: <iga.720269805@dagobert> Organization: California Polytechnic State University, San Luis Obispo Lines: 37