问题
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