Learn R Programming

biopixR (version 1.1.0)

importImage: Import an Image File

Description

This function is a wrapper to the load.image and image_read functions, and imports an image file and returns the image as a 'cimg' object. The following file formats are supported: TIFF, PNG, JPG/JPEG, and BMP. In the event that the image in question contains an alpha channel, that channel is omitted.

Usage

importImage(path2file)

Value

An image of class 'cimg'.

Arguments

path2file

path to file

Examples

Run this code
path2img <- system.file("images/beads_large1.bmp", package = 'biopixR')
img <- importImage(path2img)
img |> plot()

path2img <- system.file("images/beads_large2.png", package = 'biopixR')
img <- importImage(path2img)
img |> plot()

Run the code above in your browser using DataLab