writeTIFF(tiff)
writeTIFF()所属R语言包:tiff
Write one or more bitmap images in TIFF format
写一个或多个位图图像TIFF格式
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Writes images into a TIFF file or a raw vector representing such.
写入到一个TIFF文件或原始向量,表示这样的图像。
用法----------Usage----------
writeTIFF(what, where, bits.per.sample = 8L,
compression = c("LZW", "none", "PackBits", "RLE", "JPEG", "deflate"),
reduce = TRUE)
参数----------Arguments----------
参数:what
either an image or a list of images. An image is a real matrix or array of three dimensions, or an object of the class "nativeRaster".
图像或图像的列表。一种图象是一个真正的矩阵或三维阵列,或对象类"nativeRaster"。
参数:where
file name or a raw vector
文件名或原始的矢量
参数:bits.per.sample
number of bits per sample (numeric scalar). Supported values in this version are 8, 16, and 32.
每个样本的位数(数字标量)的数量。在这个版本中支持的值是8,16,和32。
参数:compression
desired compression algorithm (string). Optionally, it can be specified as a numeric value corresponding to the compression TIFF tag, but it needs to be also supported by the underlying TIFF library
所需的压缩算法(字符串)。任选地,它可以被指定为一个数字值对应于压缩TIFF标记,但它需要由底层TIFF库还支持
参数:reduce
if TRUE then writeTIFF will attempt to reduce the number of planes in native rasters by analyzing the image to choose one of RGBA, RGB, GA or G formats, whichever uses the least planes without any loss. Otherwise the image is always saved with four planes (RGBA).
如果TRUEwriteTIFF将尝试在本地栅格的图像进行分析,以选择一个RGBA,RGB,GA或G的格式,两者使用的飞机没有任何损失的飞机数量减少。否则图像始终保存有四架飞机(RGBA)。
Details
详细信息----------Details----------
By default writeTIFF uses the same number of planes as there are planes in the input image. For native images it is always four unless reduce = TRUE is set (see above). Consequently, color maps are not used. The output always uses contiguous planar configuration (baseline TIFF). The output is tagged with a photometric tag of either RGB (3 or 4 planes) or zero-is-black (1 or 2 planes). If what is a list then the TIFF output will be a directory of the corresponding number of images (in TIFF speak - not to be confused with file directories).
缺省情况下writeTIFF使用相同数量的平面作为在输入图像中存在的平面。对于本机的图像,它总是四除非reduce = TRUE(见上文)。因此,不使用彩色图。输出总是使用连续的平面配置(基线TIFF)。的输出被标记或RGB(3或4个平面)或零是黑色的(1或2的平面)与测光标记。如果what是一个列表,然后将TIFF输出相应的数字图像(TIFF说话 - 不被混淆与文件目录)的目录。
值----------Value----------
If where is a raw vector then the value is the raw vector containg the TIFF contents, otherwise a scalar integer specifying the number of images written in the file.
如果where是一个原始矢量的值是原始的的矢量containg的的TIFF内容,否则一个标量整数,指定数量的书面文件中的图像。
(作者)----------Author(s)----------
Simon Urbanek
参见----------See Also----------
readTIFF
readTIFF
实例----------Examples----------
img <- readTIFF(system.file("img", "Rlogo.tiff", package="tiff"))
# write without the alpha channel[alpha通道的情况下,]
tiff <- writeTIFF(img[,,-4], raw(0))
# read as native[读为本地]
i2 <- readTIFF(tiff, native=TRUE)
# write reduced - should be the same as tiff[写减少 - 为TIFF应该是相同的]
t2 <- writeTIFF(i2, raw(0), reduce=TRUE)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|