[comp.sys.amiga.tech] Simple IFF question

randy@sauron.Columbia.NCR.COM (Randy Smith) (10/07/89)

Greetings!

I'm finally starting to investigate the IFF.  I have been reading over a 
document that I snagged off of the net some time ago.  It is titled:

"Intro to Amiga IFF ILBM Files and Amiga Viewmodes" by Carolyn Scheppner
 - Commodore Amiga Technical Support

(Thank You!).  At the end of the paper she states that

"Amiga ILBMs images must be a even number of bytes wide.  Smaller images 
(such as brushes) are padded to an even byte width."  

My question is are the height and width values in the BMHD adjusted to
take into account the padding or do they reflect the true size of the
bitmap without the padding.  In other words, are we supposed to "know" about
padding and throw it away when we parse a IFF file for the brush.  I 
realize that it's probably in the manuals somewhere, but my manuals are
at home.  Any help is appreciated.

-Randy Smith

   -------------------------------------------------------------------------   
 / USENET: randy@sauron.Columbia.NCR.COM     |   Call CAUSER's Amiga BBS!    \ 
|  DISCLAIMER: The opinions above and below  |   803-796-3127 8pm-8am 8n1     |
|              are mine. Not NCR's. OK?      |         300/1200/2400          |
 \ "Cessna 22 sierra fly heading 270 and inform when you have field insight" / 
   -------------------------------------------------------------------------   

ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) (10/08/89)

In article <1745@sauron.Columbia.NCR.COM> randy@sauron.Columbia.NCR.COM (Randy Smith) writes:
>"Amiga ILBMs images must be a even number of bytes wide.  Smaller images 
>(such as brushes) are padded to an even byte width."  
>
>My question is are the height and width values in the BMHD adjusted to
>take into account the padding or do they reflect the true size of the
>bitmap without the padding.  [ ... ]

	BMHD.w reflects the true width of the bitmap; you are supposed to
"know" about the padding, and mask off extra bits to zero.  BMHD.h is
always an exact value.

	Amiga BitMaps are required to be word-aligned, too, so this works
out nicely.

_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Leo L. Schwab -- The Guy in The Cape	INET: well!ewhac@ucbvax.Berkeley.EDU
 \_ -_		Recumbent Bikes:	UUCP: pacbell > !{well,unicom}!ewhac
O----^o	      The Only Way To Fly.	      hplabs / (pronounced "AE-wack")
			     "I've been busy..."