Read and write PNG images

This package provides an easy and simple way to read, write and display bitmap images stored in the PNG format. It can read and write both files and in-memory raw vectors.


News

NEWS/Changelog

0.1-7 2013-12-03 o fix endianness issue in writePNG() on big-endian machines when using nativeRaster

0.1-6 2013-07-02 o add support for text tags as well as R object metadata which is serialized into the text field (Thanks to Duncan Temple Lang for the idea)

0.1-5 2013-06-03 o add dpi and asp to writePNG() which allows to store the image resolution or aspect ratio (via the sPHYs PNG tag).

o	add info flag to readPNG() which interprets some optional
tags to return additional information such as dpi, asp
or gamma if stored.

o	try to detect local libpng via LOCAL_SOFT on Windows.
Note that if you use LOCAL_SOFT, you are taking full
responsibility over the libraries that png will be linked
against.

0.1-4 2011-12-10 o writePNG() now supports binary connection as target and the default target is now raw()

0.1-3 2011-09-02 o remove debugging output

o	added a missing call to png_set_interlace_handling to allow
libpng to de-interlace images

o	prevent warnings in readPNG() example for the windows device
which is incapable of any transparency

0.1-2 2011-01-19 o support raw array as input to writePNG (RGBA only)

o	do not truncate 16-bit images in readPNG() if the resulting
output is not nativeRaster

o	Windows binary on RForge has been updated to libpng 1.5.0

0.1-1 2010-04-06 o add tolerance to writePNG() to avoid shifts by one in color because of numerical representation of discretized values

o	adapt to a last-minute change in R 2.11.0 from raster() to
rasterImage()

o	add support for more efficient nativeRaster format

0.1-0 2010-03-17 o first release on CRAN, supports readPNG() and writePNG() for files and raw vectors. readPNG() supports any input color type but will convert to 1-4 planes with 8-bit accuracy each. writePNG() will write out 1-4 planes 8-bit each. writePNG() has currenty no provision for generating or stroring a palette.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.