| Title: | Interface to IrfanView |
|---|---|
| Description: | Wrapper functions to IrfanView functionality. |
| Authors: | Hauke Sonnenberg [aut, cre] (ORCID: <https://orcid.org/0000-0001-9134-2871>), Michael Rustler [ctb] (ORCID: <https://orcid.org/0000-0003-0647-7726>), Kompetenzzentrum Wasser Berlin gGmbH [cph] |
| Maintainer: | Hauke Sonnenberg <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.99 |
| Built: | 2026-06-07 10:27:32 UTC |
| Source: | https://github.com/KWB-R/kwb.iview |
Append Images Horizontally or Vertically
appendImages( files, direction, file, run = TRUE, irfanViewExe = defaultIrfanViewExe() )appendImages( files, direction, file, run = TRUE, irfanViewExe = defaultIrfanViewExe() )
files |
paths to image files to be appended |
direction |
1 = horizontally, 2 = vertically |
file |
name of output file |
run |
logical. If |
irfanViewExe |
path to IrfanView Executable file |
Convert Image to Format
convertToFormat( imagepath, format, outputdir = dirname(imagepath), wait = TRUE, irfanViewExe = defaultIrfanViewExe() )convertToFormat( imagepath, format, outputdir = dirname(imagepath), wait = TRUE, irfanViewExe = defaultIrfanViewExe() )
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 |
irfanViewExe |
path to IrfanView Executable |
Use IrfanView to Crop the Image and Set Borders
cropImageAndSetBorders( inputdir, outputdir, irfanViewExe = defaultIrfanViewExe(), crop = c(left = 0, top = 0, width = -1, height = -1), border = c(left = 0, right = 0, top = 0, bottom = 0), canvasColor = 255, useIni = TRUE, wait = FALSE, inputPattern = "*.gif" )cropImageAndSetBorders( inputdir, outputdir, irfanViewExe = defaultIrfanViewExe(), crop = c(left = 0, top = 0, width = -1, height = -1), border = c(left = 0, right = 0, top = 0, bottom = 0), canvasColor = 255, useIni = TRUE, wait = FALSE, inputPattern = "*.gif" )
inputdir |
full input path including file name or pattern, e.g. "*.png", "*.gif" |
outputdir |
full output path including file name or pattern, e.g. "*.pgm" |
irfanViewExe |
path to IrfanView Executable File |
crop |
vector of four integers (left, top, width, height): optional coordinates for cropping. If crop["left"] != -1 the image will be cropped, otherwise not. |
border |
vector of four integers (left, right, top, bottom) |
canvasColor |
passed to |
useIni |
logical. If |
wait |
passed to |
inputPattern |
file name pattern matching the files in |
Default Path to the IrfanView Executable File
defaultIrfanViewExe()defaultIrfanViewExe()
Content for INI File Specifying Crop Action
iniContentCrop( crop = c(left = 0, top = 0, width = -1, height = -1), border = c(left = 0, right = 0, top = 0, bottom = 0), canvasColor = 255 )iniContentCrop( crop = c(left = 0, top = 0, width = -1, height = -1), border = c(left = 0, right = 0, top = 0, bottom = 0), canvasColor = 255 )
crop |
integer vector with elements named |
border |
integer vector with elements named |
canvasColor |
value used in IrvanView |
Assignement to be Used in INI File
iniFileAssignment(optname, optvalue)iniFileAssignment(optname, optvalue)
optname |
name of option |
optvalue |
value of option |
Write INI File and Return Option String
writeIniFile(outputdir, crop, border, canvasColor, filename = "i_view32.ini")writeIniFile(outputdir, crop, border, canvasColor, filename = "i_view32.ini")
outputdir |
output directory |
crop |
passed to |
border |
passed to |
canvasColor |
passed to |
filename |
name of INI file |
option string required to tell IrfanView to use the INI file