imgScale: Scale an image

Description Usage Arguments Value Note See Also Examples

Description

This function scales an image using the given interpolation and returns a new image.

Usage

1
imgScale(imgdata, x_scale, y_scale, interpolation)

Arguments

imgdata

The image

x_scale

The horizontal scale factor

y_scale

The vertical scale factor

interpolation

The interpolation method: nearestneighbor | bilinear | cubic | spline

Value

return an imagedata object

Note

The scale factors are expected to be greater than 1. To reduce an image use the minification functions instead.

See Also

imgNearestNeighborScale imgBilinearScale imgCubicScale imgSplineScale imgMedianShrink imgAverageShrink

Examples

1
2
3
4
5
	## Not run: 
		x <- readJpeg(system.file("samples", "violet.jpg", package="biOps"))
		y <- imgScale(x, 1.5, 1.5, 'bilinear')
	
## End(Not run)

matiasb/biOps documentation built on May 21, 2019, 12:55 p.m.