[R] reading tiff files

Laurent Gautier laurent at cbs.dtu.dk
Tue Nov 20 17:40:20 CET 2001


I have not expertise in the tiff format, but browsing the documentation
for the libtiff C library I thought something suitable for some cases
could be done (see the quote below).

If anybody reports having experienced problems with that..... it's a
different story....


-------------------------------------------------------------------
TIFFRGBAImage Support

libtiff provides a high-level interface for reading image data from a
TIFF file. This interface handles the details of data organization and
format for a wide variety of TIFF files; at least the large majority of
those files that one
would normally encounter. Image data is, by default, returned as ABGR
pixels packed into 32-bit words (8 bits per sample). Rectangular rasters
can be read or data can be intercepted at an intermediate level and
packed
into memory in a format more suitable to the application. The library
handles all the details of the format of data stored on disk and, in
most cases, if any colorspace conversions are required: bilevel to RGB,
greyscale to
RGB, CMYK to RGB, YCbCr to RGB, 16-bit samples to 8-bit samples,
associated/unassociated alpha, etc. 
--------------------------------------------------------------------




regards,



Laurent







Prof Brian Ripley wrote:
> 
> On Tue, 20 Nov 2001, Laurent Gautier wrote:
> 
> > Dear all,
> >
> >
> > Following the answers to my previous post, it seems that the way is to
> > convert first the picture before being abble to read it using the
> > pixmap package.
> >
> > Would it make sense to have a function in pixmap to directly read tiff
> > file ?
> >
> > I was thinking of making a function for that would do the job, and would
> > be ready to make the extra step to have something eventually usefull for
> > others (and why not included in the pixmap package).
> >
> > suggestions ?
> 
> Unfortunately, I believe tiff is not well-defined as it is an extensible
> format with a very large number of possibilities.  I think this is best
> left to an external tool, none of which are (AFAIK) comprehensive.
> 
> AFAIR, pdftex took out tiff support after a while for exactly this reason.
> 
> --
> Brian D. Ripley,                  ripley at stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272860 (secr)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
> 
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

-- 
Laurent Gautier			CBS, Building 208, DTU
PhD. Student			D-2800 Lyngby,Denmark	
tel: +45 45 25 24 85		http://www.cbs.dtu.dk/laurent
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list