interpretIFFChunk: Interpret an IFFChunk object

interpretIFFChunkR Documentation

Interpret an IFFChunk object


IFFChunks represent the structure of the Interchange File Format well, but the iformation is stored as raw data. This method tries to interpret and translate the information into a more comprehensive format.


## S4 method for signature 'IFFChunk'
interpretIFFChunk(x, ...)



An IFFChunk object which needs to be interpreted.


Currently ignored.


Interchange File Format chunks can hold any kind of information (images, audio, (formatted) text, etc.). This method will try to convert this information into something useful. Information may get lost in the translation, so be careful when converting back to an IFFChunk-class object using IFFChunk-method.

An error is thrown when the IFFChunk object is currently not interpretable by this package. See IFFChunk-method for an overview of currently supported IFF chunks. This list may increase while this package matures.


If x is interpretable by this package an S3 class object of IFF.ANY is returned. The content of the returned object will depend on the type of IFFChunk provided for x. The result can for instance be a raster image (as.raster), a list of audio Waves, a character string or a named list.


Pepijn de Vries

See Also

Other iff.operations: IFFChunk-class, WaveToIFF(), as.raster.AmigaBasicShape(), getIFFChunk(), rasterToIFF(), rawToIFFChunk(), read.iff(), write.iff()


## Not run: 
## load an IFF file
example.iff <- read.iff(system.file("ilbm8lores.iff", package = "AmigaFFH"))

## in this case, the file is a FORM container with a bitmap image, and a
## list with a raster object is returned when interpreted:
example.itpt <- interpretIFFChunk(example.iff)

## Let's extraxt the bitmap header from the main chunk:
bmhd <- getIFFChunk(example.iff, c("ILBM", "BMHD"))

## When interpreted, a named list is returned with (meta-)information
## on the bitmap image:
bmhd.itpt <- interpretIFFChunk(bmhd)

## End(Not run)

AmigaFFH documentation built on Aug. 27, 2023, 9:07 a.m.