crop_white_margins: A function to crop white margins of a PNG image

View source: R/save_plot.R

crop_white_marginsR Documentation

A function to crop white margins of a PNG image

Description

This is taken with some slight modifications from here: https://github.com/statnmap/SDMSelect/blob/master/R/ToolFunctions.R

Usage

crop_white_margins(x, new_margin = 15, overwrite = FALSE)

Arguments

x

path to the PNG image

new_margin

number of white pixels lines to keep

overwrite

Logical, default FALSE, whether to overwrite the original file. If FALSE, a new file with _crop appended to the filename will be saved.


tsostarics/sostools documentation built on June 1, 2025, 10:20 p.m.