resize | R Documentation |
Image
resize
returns a resized version of an Image
.
resize(
image,
height = NULL,
width = NULL,
fx = NULL,
fy = NULL,
interpolation = "linear",
target = "new"
)
image |
An |
height |
A positive integer representing the new height in pixels of the image (default: NULL). |
width |
A positive integer representing the new width in pixels of the image (default: NULL). |
fx |
A positive numeric representing the ratio by which the width of
the image must be resized (default: NULL). Ignored if |
fy |
A positive numeric representing the ratio by which the height of
the image must be resized (default: NULL). Ignored if |
interpolation |
A character string representing the type of interpolation to use during resizing (default: "linear"). It can be any of the following:
|
target |
The location where the results should be stored. It can take 2 values:
|
If target="new"
, the function returns an Image
object. If target
is an Image
object, the function
returns nothing and modifies that Image
object in place.
Simon Garnier, garnier@njit.edu
Image
balloon <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
balloon_resized <- resize(balloon, fx = 0.2, fy = 0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.