read_pixels: Read pixels from JPEG

Description Usage Arguments Value Examples

View source: R/colors.R

Description

Reads pixels from a JPEG file into a matrix with RGB columns

Usage

1

Arguments

file

path to JPEG file

Value

matrix with three columns, R, G and B, and as many rows as there are pixels in the JPEG.

Examples

1
2
example_jpg <- system.file("extdata", "example.JPG", package = "routes")
read_pixels(example_jpg)

cwickham/routes documentation built on Nov. 4, 2019, 9:34 a.m.