Learn R Programming

videoplayR (version 0.3.1)

writeImg: Save image object to file

Description

This function write a vpImage object to an image file on the computer's drive. This function can save image files in the following formats:
  • Windows bitmaps - *.bmp, *.dib
  • JPEG files - *.jpeg, *.jpg, *.jpe
  • Portable Network Graphics - *.png
  • Portable image format - *.pbm, *.pgm, *.ppm
  • TIFF files - *.tiff, *.tif

The image format is chosen based on the filename extension.

Usage

writeImg(filename, image)

Arguments

filename
A character string of the path to the image file.
image
The vpImage object to save.

Value

This function does not return anythin.

See Also

readImg, vpImage

Examples

Run this code
filename <- system.file("sample_img/SampleVideo_1080x720_5mb.png", package = "videoplayR")
img <- readImg(filename)
writeImg("test_img.png", img)

Run the code above in your browser using DataLab