talira

Read, write and display PNG images in R

open sourceGPL-2.0-only OR GPL-3.0-onlyfree

png is a small R package for reading, writing and displaying bitmap images in the PNG format. It reads PNG files or in-memory raw vectors into R arrays and writes arrays back out as PNG, using the system's libpng.

Problems it solves

  • load a PNG image into R as a matrix
  • save an R array as a PNG file
  • read a PNG from memory in R without writing a temporary file

Features

  • read PNG files into R arrays
  • write R arrays as PNG files
  • read and write in-memory raw vectors
  • display bitmap images

Limitations

  • Needs the libpng system library.1