ilbmifflib
IFF ILBM is the Amiga’s standard picture format, the one Deluxe Paint
writes. ILBMInfo reads the header of such a file, and ILBMWidth,
ILBMHeight, ILBMDepth and ILBMViewMode then tell its size, number
of bitplanes and display mode, so that a program can open a screen or
make a bitmap that fits before it loads the picture:
If ILBMInfo("pic.iff")
BitMap 0,ILBMWidth,ILBMHeight,ILBMDepth
LoadBitMap 0,"pic.iff",0
EndIfDecodeILBM unpacks a picture that is already in memory, for example
one included in the program with IncBin.
Based on the ilbmifflib guide by Acid Software.
Library number 161.
Commands
DecodeILBM
Unpacks the IFF ILBM picture at the memory address given into a bitmap.
Statement. Help text: Bitmap#,MemoryLocation
Arguments: .w, .l
A picture without a header is the error “Can’t Find IFF ‘BMHD’”, one without picture data “Can’t Find IFF ‘BODY’”. Only the part of the picture that fits the bitmap is stored: the planes, rows and bytes per row beyond the bitmap’s depth, height and width are unpacked and dropped.
ILBMDepth
The number of bitplanes of the picture read by the last ILBMInfo.
Function, result .w. No help text.
No arguments.
ILBMHeight
The height in pixels of the picture read by the last ILBMInfo.
Function, result .w. No help text.
No arguments.
ILBMInfo
Reads the header of an IFF ILBM file, for ILBMWidth, ILBMHeight, ILBMDepth and ILBMViewMode. As a function, it returns true (-1) if the file could be read, else false (0).
Statement or function, result .l. Help text: Filename$
Arguments: $
ILBMViewMode
The display mode of the picture read by the last ILBMInfo, from the page size in the file; $8000 for high resolution (a page at least 480 pixels wide) plus 4 for interlace (at least 300 lines high), else 0.
Function, result .l. No help text.
No arguments.
ILBMWidth
The width in pixels of the picture read by the last ILBMInfo.
Function, result .w. No help text.
No arguments.