How to convert tiff image to jpeg using r

I have one hundred images that are in TIFF format, I want to convert them to JPEG format. I am using R. Could you please tell me which function or which package should I use to make this conversion to r. Thank you in advance.

+4


source to share


1 answer


An indirect way to convert a TIFF to a JPEG image is to read the TIFF image and then write the JPEG using the TIFF and JPEG batch. For example:



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

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

      

+6


source







All Articles