Convert a grDevices raster image into an IFF formated bitmap image
rasterToIFF(x, display.mode = as.character(AmigaFFH::amiga_display_modes$DISPLAY_MODE), monitor = as.character(AmigaFFH::amiga_monitors$MONITOR_ID), anim.options, ...)
x |
A raster object created with |
display.mode |
Specify the Amiga display mode that should be used.
See |
monitor |
The Amiga monitor on which the needs to be displayed.
See |
anim.options |
Currently ignored. This argument will potentitally be implemented
in future versions of this package. Currently, animations are always encoded
with the "ByteVerticalCompression" in this package (when |
... |
Arguments passed on to |
Convert any modern image into a interleaved bitmap (image) conform Interchange File Format (IFF) specifications. If your original image is in true colour (i.e., a 24 bit colour depth) it will be converted into a bitmap image with an indexed palette.
Returns an IFFChunk
object holding an Interleaved
Bitmap (ILBM) image based on x
.
Pepijn de Vries
Other iff.operations: IFFChunk-class
,
WaveToIFF
, as.raster
,
getIFFChunk
,
interpretIFFChunk
,
rawToIFFChunk
, read.iff
,
write.iff
Other raster.operations: AmigaBitmapFont
,
as.raster
, bitmapToRaster
,
dither
, index.colours
,
rasterToAmigaBitmapFont
,
rasterToBitmap
,
rasterToHWSprite
## Not run: ## first: Let's make a raster out of the 'volcano' data, which we can use in the example: volcano.raster <- as.raster(t(matrix(terrain.colors(1 + diff(range(volcano)))[volcano - min(volcano) + 1], nrow(volcano)))) ## Turning the raster into an IFFChunk object is easy: volcano.iff <- rasterToIFF(volcano.raster) ## This object can be saved as an IFF file using write.iff ## in special modes HAM6 and HAM 8 higher quality images ## can be obtained. See 'rasterToBitmap' for more info on the ## special HAM modes. volcano.ham <- rasterToIFF(volcano.raster, "HAM_KEY", depth = "HAM8") ## The result can be further improved by applying dithering volcano.ham.dither <- rasterToIFF(volcano.raster, "HAM_KEY", depth = "HAM8", indexing = function(x, length.out) { index.colours(x, length.out, dither = "JJN", iter.max = 20) }) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.