image_compose: Combine two images together using operators, gravity and...

View source: R/oxy-compose.R

image_composeR Documentation

Combine two images together using operators, gravity and offset

Description

Extends 'image_composite()' to include 'gravity' argument which allows targeted placement of images

Usage

image_compose(
  image,
  composite_image,
  operator = "atop",
  gravity = "NorthWest",
  offset = "+0+0",
  compose_args = ""
)

Arguments

image

original image which will remain in the background (also known as "destination" image)

composite_image

image place on top of it (aslo known as "source" image)

operator

magick operator. See more at [ImageMagick compose](https://www.imagemagick.org/Usage/compose/) page. Default: 'atop'

gravity

one of ‘magick::gravity_types()'. Default: ’NorthWest'

offset

geometry point specification of offset. Affected by choice of ‘gravity'. Default: ’+0+0'

compose_args

other parameters required by operator. Default: ”

Value

combined image

See Also

attributes,composite geometry_parse

Examples

## Not run: 
if(interactive()){
 frink <- image_read("https://jeroen.github.io/images/frink.png")
 image_compose(frink, magick::rose, gravity="North")
 }

## End(Not run)

dmi3kno/bunny documentation built on Dec. 7, 2022, 7:22 p.m.