ch.resize_jpg: A function to resize images.

View source: R/ch.resize_jpg.r

ch.resize_jpgR Documentation

A function to resize images.

Description

This function resizes images.

Usage

ch.resize_jpg(
  input_file,
  output_file,
  width = NULL,
  height = NULL,
  keepAspectRatio = T
)

Arguments

input_file

a string specifying the name of the input file containing the images.

output_file

a string specifying the name of the output file that will contain the resized images.

width

an integer specifying the new width of the image in pixels.

height

an integer specifying the new height of the image in pixels.

keepAspectRatio

A boolean specifying whether the orginal aspect ratio should be kept. If TRUE, then specify either the width or the height of the new image - NOT BOTH. DEFAULT = TRUE.

Value

Nothing.

Examples

ch.resize_jpg ("inputImage.jpg", "outputImageFile.jpg", width = 200, keepAspectRatio=T)

ccpluncw/ccpl_R_chutils documentation built on Feb. 28, 2024, 1:17 a.m.