to_size | R Documentation |
Resize and crop/pad images to a specified size
to_size( stimuli, width = NULL, height = NULL, fill = wm_opts("fill"), crop = FALSE, keep_rels = FALSE )
stimuli |
list of stimuli |
width |
the target width (if null, the maximum stimulus width is used) |
height |
the target height (if null, the maximum stimulus height is used) |
fill |
background color if cropping goes outside the original image, see |
crop |
whether to crop or pad images to make them the specified size |
keep_rels |
whether to keep the size relationships between images in the set, or make all the maximum size |
list of stimuli with cropped tems and/or images
Stimulus manipulation functions
align()
,
crop_tem()
,
crop()
,
greyscale()
,
horiz_eyes()
,
image_func()
,
mask_oval()
,
mask()
,
mirror()
,
pad()
,
resize()
,
rotate()
# images with different aspect ratios and sizes stimuli <- demo_unstandard(c(1:4, 6:9)) to_size(stimuli, 200, 200, fill = "dodgerblue")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.