Description Usage Arguments Details Value References See Also Examples
View source: R/BotanizeR_imageresize.R
Batch resize images for plotting in BotanizeR_quiz()
or
BotanizeR Shiny app maintaining aspect ratio.
1 2 3 4 5 6 7 | BotanizeR_imageresize(
image_folders = NULL,
image_width = NA,
max_height = NA,
int_type = 1,
quality = 1
)
|
image_folders |
character vector defining folders where images that shall be resized are stored. |
image_width |
number defining the width of the resized images as number of pixels. |
max_height |
number defining the maximum height of the resized images.
If |
int_type |
number indicating the method of interpolation used in
|
quality |
numeric > 0 and <= 1 defining the quality of the images when
saved as *.jpg by |
Resizing images to make them fit and load faster in the
BotanizeR Shiny application and BotanizeR_quiz()
.
Resized images will be saved at the same location where the input folders
are located but folder names will be expanded about
paste("_",image_width,sep="")
.
1 2 3 4 |
1 2 3 4 5 6 7 8 9 10 11 12 | # Example
## Not run:
BotanizeR_imageresize(image_folders = "inst/WWW/images_to_resize",
image_width = 560, max_height = 700, quality = 1)
BotanizeR_imageresize(image_folders = c("inst/WWW/images_to_resize_1",
"inst/WWW/images_to_resize_2"),
image_width = 560, max_height = 700,
quality = 1, int_type = 5)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.