How to convert tiff image to jpeg using r [closed]

跟風遠走 提交于 2019-12-23 15:53:22

问题


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.


回答1:


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)


来源:https://stackoverflow.com/questions/27439538/how-to-convert-tiff-image-to-jpeg-using-r

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!