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

Description Usage Arguments Details Value Author(s) Examples

Description

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

Usage

1
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

1
2
3
4
5
## Not run: 
tif <- readTiff(system.file("tiff", "jello.tif", package="rtiff"))
writeTiff(tif@red, "atesttif.tif")

## End(Not run)

rtiff documentation built on Jan. 14, 2021, 5:20 a.m.

Related to writeTiff in rtiff...