如何使用R将TIFF图像转换为JPEG [英] How to convert tiff image to jpeg using r

查看:247
本文介绍了如何使用R将TIFF图像转换为JPEG的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一百张TIFF格式的图像,我想将它们转换为JPEG格式.我使用R语言.您能告诉我在r中进行转换时应使用什么功能或使用哪个程序包.预先谢谢你.

I have a hundred image that are in TIFF format, I want to convert them to JPEG format. I use the R language. could you please tell me what function or what package should I use to make this conversion in r. Thank you in advance.

推荐答案

将tiff转换为jpeg图像的间接方法是读取TIFF图像,然后使用软件包tiff和jpeg写入JPEG.例如:

An indirect way to convert tiff to jpeg image is to read TIFF image and then write JPEG using package tiff and jpeg. For example:

#Load
library("jpeg")
library("tiff")

img <- readTIFF("origin.tiff", native=TRUE)
writeJPEG(img, target = "Converted.jpeg", quality = 1)

这篇关于如何使用R将TIFF图像转换为JPEG的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆