[R] about image and rgb

Martin Maechler maechler at stat.math.ethz.ch
Mon Jul 8 15:24:10 CEST 2002

>>>>> "Olivier" == Olivier Martin <olivier.martin at inrialpes.fr> writes:

    Olivier> I have a 16 bit image (TIFF) and i want to analyse
    Olivier> the pixels distribution.  So, i obtain a matrix
    Olivier> which values are between 0 and 2^16 -1.

    Olivier> Now i would like to represnt this image with the
    Olivier> fucntions rgb() and image().  
    Olivier> I am not sure , but i think that only 256 colors
    Olivier> are available.  

what makes you think so?  It's not true.

There are (2^8)^3 (i.e 24-bit) colors in R, as you can see
quickly from looking at the result of rgb(), e.g.

Now the for viewing thing is devices, i.e. hardware and
device-driver software.
A few years ago, still many Sun Workstations came with graphics
cards that only permitted 8-bit (i.e. 256 different colors at a time).

Can you be more specific about your problems?

    Olivier> So is there a solution to represent all the palette
    Olivier> of the colors or i have to limit the
    Olivier> representations with 256 colors.

Martin Maechler <maechler at stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO C16	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><
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