| image_crop | R Documentation |
Crop an image to a rectangular region
image_crop(image, x, y, w, h)
image |
An image list returned by |
x |
Left edge of the crop region (0-based pixel coordinate). |
y |
Top edge of the crop region (0-based pixel coordinate). |
w |
Crop width in pixels. |
h |
Crop height in pixels. |
A new image list with the cropped dimensions.
cube <- generate_cuboid(c(0, 0, 0), c(1, 1, 1))
img <- render_mesh(cube$vertices, cube$triangles)
img <- image_crop(img, 100, 50, 400, 300)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.