Re: BMP->Table
- To: mathgroup at smc.vnet.net
- Subject: [mg31081] Re: [mg31071] BMP->Table
- From: "P.J. Hinton" <paulh at wolfram.com>
- Date: Sun, 7 Oct 2001 03:11:48 -0400 (EDT)
- Organization: "Wolfram Research, Inc."
- Sender: owner-wri-mathgroup at wolfram.com
On Sat, 6 Oct 2001, Wonko the Sane wrote: > Is there a way in Mathematica to convert a greyscale Bitmap into a > Table of values where each element in the array corresponds to the > value (0-255) of the pixel at that point. The answer to this question ultimately depends on what format is used to store the grayscale bitmap. If it is a portable graymap (PGM), it is very easy to define a function with ReadList[] calls. If it is something more complicated, you may be able to use Import[] to obtain the Raster[] for the graphic and convert the contents into graylevels of the desired range. -- P.J. Hinton User Interface Programmer paulh at wolfram.com Wolfram Research, Inc. Disclaimer: Opinions expressed herein are those of the author alone.