Crop images of class *Image
in this package with a bounding box.
Usage
# S4 method for SpatRasterImage
cropImg(x, bbox, filename = "")
# S4 method for BioFormatsImage
cropImg(x, bbox)
# S4 method for ExtImage
cropImg(x, bbox)
Arguments
- x
An object of class
*Image
as implemented in this package.- bbox
Numeric vector with names "xmin", "xmax", "ymin", "ymax", in any order, to specify the bounding box.
- filename
Output file name for transformed SpatRaster.
Value
Image of the same class as input but cropped. For
BioFormatsImage
, the image is not loaded into memory; only the
extent is changed.
See also
Other image methods:
SFE-image
,
affineImg()
,
dim,BioFormatsImage-method
,
ext()
,
imgRaster()
,
imgSource()
,
mirrorImg()
,
rotateImg()
,
scaleImg()
,
translateImg()
,
transposeImg()