Convert Image to Format

convertToFormat(
  imagepath,
  format,
  outputdir = dirname(imagepath),
  wait = TRUE,
  irfanViewExe = defaultIrfanViewExe()
)

Arguments

imagepath

full path to image file to be converted

format

file extension of target format (without ".", e.g. "jpg", "bmp", ...)

outputdir

output directory where converted image is to be saved. Per default the file is created in the directory of imagepath

wait

passed to shell

irfanViewExe

path to IrfanView Executable