Clips an image to the bounds of a Geometry, and scales the clipped image to a particular size or scale.
Usage | Returns |
---|---|
Image.clipToBoundsAndScale(geometry, width, height, maxDimension, scale) | Image |
Argument | Type | Details |
---|---|---|
this: input | Image | The image to clip and scale. |
geometry | Geometry, default: null | The Geometry to clip the image to. The image will be clipped to the bounding box, in the image's projection, of this geometry. |
width | Integer, default: null | The width to scale the image to, in pixels. Must be provided along with "height". Exclusive with "maxDimension" and "scale". |
height | Integer, default: null | The height to scale the image to, in pixels. Must be provided along with "width". Exclusive with "maxDimension" and "scale". |
maxDimension | Integer, default: null | The maximum dimension to scale the image to, in pixels. Exclusive with "width", "height" and "scale". |
scale | Float, default: null | If scale is specified, then the projection is scaled by dividing the specified scale value by the nominal size of a meter in the image's projection. Exclusive with "width", "height" and "maxDimension". |