Skip to contents

Read the Interchange File Format (IFF) as an IFFChunk() object.

Usage

read.iff(file, disk = NULL)

Arguments

file

A filename of an IFF file to be read, or a connection from which binary data can be read.

disk

A virtual Commodore Amiga disk from which the file should be read. This should be an amigaDisk() object. Using this argument requires the adfExplorer package. When set to NULL, this argument is ignored.

Value

Returns a IFFChunk() object read from the specified file.

Details

Information is stored as `chunks' in IFF files (see IFFChunk()). Each chunk should at least contain a label of the type of chunk and the data for that chunk. This function reads all chunks from a valid IFF file, including all nested chunks and stores them in an IFFChunk() object. IFF files can hold any kind of data (e.g. images or audio), this read function does not interpret the file. Use interpretIFFChunk() for that purpose.

Author

Pepijn de Vries

Examples

if (FALSE) {
## let's read a bitmap image stored in IFF as provided with this package:
filename <- system.file("ilbm8lores.iff", package = "AmigaFFH")
example.iff <- read.iff(filename)

## And plot it:
plot(example.iff)
}