MathGroup Archive 1998

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

Search the Archive

Re: Mathematica graphics Import



Ray Pendergraph wrote:
> 
> I am trying to import standard graphics files into Mathematica using
> ReadList. Mathematica wants only the raw matrix data though. Do I have
> to write a simple program to extract the data to a readable (by
> Mathematica) format or is there some utilities. Does anyone have an
> easier way to do this? Thankyou in advance.
> 
> Ray Pendergraph
> appeal@mindspring.com

If, by "standard graphics files" you mean bitmaps, tif files, gif files
etc., then there is no built-in way to get the data out of them, if by
data, you mean the raw values in either gray level or RGB of each
pixel.  Enter the wonderful shareware program paintshop pro
(www.jasc.com) which contains converters for 30+ graphics formats.  You
can also save the graphics files in RAW, PPM (portable pixel map) or
PGM (portable gray map) and read them in with ReadList.  With a little
creativity on the ReadList formatting, you can extract the data.

There is also a package out on Mathsource which reads TIFF files, but it
requires another package which speeds up the reading of binary files
which, last time I heard, doesn't work under Win95.

Personnally, I think graphics->data conversion ought to be built into
Mathematica, especially in light of the now infamous "cat picture" on
page 9 of the Mathematica book.  The advertising certainly suggests
quite strongly that some kind of graphics conversion subroutines are
built in to Mathematica.  Such is not the case, but we have discovered
the work-around.



  • Prev by Date: Re: how to replace...?
  • Next by Date: Re: Pagination problems Mathematica 3.0
  • Prev by thread: Mathematica graphics Import
  • Next by thread: Pagination problems Mathematica 3.0