Convert AmigaFFH objects into grDevices raster images
Convert AmigaFFH objects that contain bitmap images into grDevices raster images.
## S3 method for class 'AmigaBitmapFont' as.raster(x, text, style, palette, ...) ## S3 method for class 'AmigaBitmapFontSet' as.raster(x, text, style, palette, ...) ## S3 method for class 'hardwareSprite' as.raster(x, background = "#AAAAAA", ...) ## S3 method for class 'IFFChunk' as.raster(x, ...) ## S3 method for class 'AmigaIcon' as.raster(x, selected = F, ...)
x |
Object that needs to be converted into a |
text |
Text (a |
style |
Argument is only valid when |
palette |
Argument is only valid when |
... |
Currently ignored. |
background |
Use the argument |
selected |
This argument is only allowed when |
Images on the Amiga were stored as bitmap images with indexed colour
palettes. This was mainly due to hardware and memory limitations.
Bitmap images could also be embedded in several file types. This method
can be used to convert AmigaFFH objects read from such files into
grDevices raster images (as.raster
).
Pepijn de Vries
Other iff.operations: IFFChunk-class
,
WaveToIFF
, getIFFChunk
,
interpretIFFChunk
,
rasterToIFF
, rawToIFFChunk
,
read.iff
, write.iff
Other raster.operations: AmigaBitmapFont
,
bitmapToRaster
, dither
,
index.colours
,
rasterToAmigaBitmapFont
,
rasterToBitmap
,
rasterToHWSprite
, rasterToIFF
## Not run: ## load an IFF file example.iff <- read.iff(system.file("ilbm8lores.iff", package = "AmigaFFH")) ## The file contains an interleaved bitmap image that can be ## converted into a raster: example.raster <- as.raster(example.iff) ## the raster can be plotted: plot(example.raster) ## note that the IFFChunk can also be plotted directly: plot(example.iff) ## Hardware sprites can also be converted into raster images. ## Let's generate a 16x16 sprite with a random bitmap: spr <- new("hardwareSprite", VStop = 16, bitmap = as.raw(sample.int(255, 64, replace = TRUE))) ## now convert it into a raster image. ## as the background colour is not specified for hardware ## sprite, we can optionally provide it here. spr.raster <- as.raster(spr, background = "green") ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.