R: A function to load TIFF images into a pixmap.

writeTiff {rtiff} | R Documentation

## A function to load TIFF images into a pixmap.

### Description

Loads a TIFF image from a file and returns the image as a pixmap object, with optional scaling.

### Usage

    writeTiff(pixmap, fn)

### Arguments

`pixmap` | Either a pixmapRGB or matrix containing the image to save. In the case of a matrix, a new pixmapRGB will be created from it. The resulting TIFF file will be RGB, but will appear grey because each channel will be identical.
`fn` | What to call the new tiff file.

### Details

This function saves the given pixmap or matrix raster as an unencrypted TIFF image, utilizing libtiff's TIFFWriteEncodedStrip, with the entire raster in a single strip (for simplicity).

### Value

None. Used for its handy side effect of creating a tiff file.

### Author(s)

Eric Kort <eric.kort@vai.org>

### Examples

    tif <- readTiff(system.file("tiff", "jello.tif", package="rtiff"))
    writeTiff(tif@red, "atesttif.tif")

[Package rtiff version 1.4.6 Index]