[R] PNG-import into R
Rajarshi Guha
rxg218 at psu.edu
Mon Nov 21 17:08:22 CET 2005
On Mon, 2005-11-21 at 09:38 -0500, Tuszynski, Jaroslaw W. wrote:
>
> Also does anybody know how hard would it be to tap into C code needed for
> 'read.jpeg', 'png' and 'jpeg' functions to write 'read.png' , 'write.png',
> and 'write.jpeg' functions?
Not too difficult (at least with libpng).
I was fiddling with adding a read.png method to the rimage package for
my own use, but have not really finished it.
The code is based on the example code from the libpng docs and and an
O'Reilly article
The C code and R wrapper can be found at
http://blue.chem.psu.edu/~rajarshi/code/R/pngio.c
http://blue.chem.psu.edu/~rajarshi/code/R/png.R
Right now it segfaults, so its not really useful yet.
-------------------------------------------------------------------
Rajarshi Guha <rxg218 at psu.edu> <http://jijo.cjb.net>
GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE
-------------------------------------------------------------------
All theoretical chemistry is really physics; and all theoretical
chemists
know it.
-- Richard P. Feynman
More information about the R-help
mailing list