twittersize: twittersize

twittersizeR Documentation

twittersize

Description

Add borders to an image to force an aspect ratio for twitter post, and write it out in png format. Does not resize original image.

Usage

twittersize(
  path,
  aspect_ratio = "16:9",
  out_prefix = "twitter ",
  border_color = "white"
)

Arguments

path

Path to image file

aspect_ratio

Desired aspect ratio, Default = "16:9" (single image in tweet). Use "7:8" if tweeting two images.

out_prefix

Prepend to name of output image, Default = "twitter"

border_color

Border color, Default = "white"

Value

path to output image

Examples

## Not run: 
if(interactive()){
 twittersize('~/Desktop/image.png')
 }

## End(Not run)

grasshoppermouse/hagenutils documentation built on Dec. 6, 2024, 8:31 p.m.