Use IrfanView to Crop the Image and Set Borders
1 2 3 4 5 6 7 8 9 10 11 | 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 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.