MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: BMP->Table

  • To: mathgroup at
  • Subject: [mg31081] Re: [mg31071] BMP->Table
  • From: "P.J. Hinton" <paulh at>
  • Date: Sun, 7 Oct 2001 03:11:48 -0400 (EDT)
  • Organization: "Wolfram Research, Inc."
  • Sender: owner-wri-mathgroup at

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 Research, Inc.
Disclaimer: Opinions expressed herein are those of the author alone.

  • Prev by Date: Require derivation for the intersection of three planes
  • Next by Date: RE: Errorbars in BOTH directions
  • Previous by thread: BMP->Table
  • Next by thread: Re: BMP->Table