Learn R Programming

imager (version 0.42.10)

resize_doubleXY: Resize image uniformly

Description

Resize image by a single scale factor. For non-uniform scaling and a wider range of options, see resize.

Usage

resize_doubleXY(im)

resize_halfXY(im)

resize_tripleXY(im)

imresize(im, scale = 1, interpolation = 3)

Arguments

im

an image

scale

a scale factor

interpolation

interpolation method to use (see doc for resize). Default 3, linear. Set to 5 for cubic, 6 for Lanczos (higher quality).

Value

an image

Functions

  • resize_doubleXY: Double size

  • resize_halfXY: Half size

  • resize_tripleXY: Triple size

  • imresize: resize by scale factor

References

For double-scale, triple-scale, etc. uses an anisotropic scaling algorithm described in: http://www.scale2x.it/algorithm.html. For half-scaling uses what the CImg doc describes as an "optimised filter", see resize_halfXY in CImg.h.

See Also

resize

Examples

Run this code
# NOT RUN {
im <- load.example("parrots")
imresize(im,1/4) #Quarter size
map_il(2:4,~ imresize(im,1/.)) %>% imappend("x") %>% plot
# }

Run the code above in your browser using DataLab